Exemple #1
0
    void Initialize()
    {
        if (mInitilized || mInitEnumerator != null)
        {
            return;
        }

        mInitEnumerator = Settings.Init <SerializedRoot>( );

        if (mInitEnumerator == null)
        {
            Debug.LogError(Settings.kLogPrefix + "Could not init Settings");
            return;
        }
        EditorUpdate.Run(() => {
            if (mInitEnumerator == null)
            {
                return(true);
            }
            return(!mInitEnumerator.MoveNext());
        }, () => {
            mInitilized     = true;
            mSettings       = new SettingsProxy();
            mFieldRenderers = GetAllInstancesOfAllSubclassesOf(typeof(FieldRendererBase));
            mInitEnumerator = null;
        });
    }
Exemple #2
0
    void Save()
    {
        if (mSaveProcess != null)
        {
            return;
        }

        mStatusMessage = "Saving ...";

        mSaveProcess = mSettings.Save(Settings.FileName);
        EditorUpdate.Run(() => {
            if (mSaveProcess == null)
            {
                return(true);
            }
            return(!mSaveProcess.MoveNext());
        }, () => {
            mSaveProcess   = null;
            mStatusMessage = kReadyMessage;
        });
    }