コード例 #1
0
        void OnEnable()
        {
            hideFlags = HideFlags.HideAndDontSave;

            if (_compileEngine == null)
            {
                _compileEngine = RexCompileEngine.Instance;
            }

            if (_texts == null)
            {
                _texts = RexStaticTextCollection.Instance;
            }

            if (_macros == null)
            {
                _macros = RexMacroHandler.LoadMacros();
            }

            RexISM.Repaint     = Repaint;
            RexISM.DebugLog    = Debug.Log;
            RexISM.ExecuteCode = Execute;
            RexISM.Enter_NoInput();

            updateSkins = true;
            minSize     = new Vector2(450f, 350f);
            autoRepaintOnSceneChange = true;
            titleContent.text        = "REX";
            titleContent.tooltip     = "Runtime Expressions";
        }
コード例 #2
0
    void OnEnable()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        else if (_instance != this)
        {
            Destroy(this);
            return;
        }
        if (_cache == null)
        {
            _cache = new Dictionary <string, GUIContent>();
        }

        if (AllTexts != null)
        {
            return;
        }
        InitializeEnglish();
    }