コード例 #1
0
        //----------------------------------------------------------
        #region 内部関数
        //----------------------------------------------------------

        static GcEditorEventManager()
        {
            if (EditorApplication.isCompiling)
            {
                return;
            }

            EditorApplication.playModeStateChanged    += OnPlayModeStateChanged;
            AssemblyReloadEvents.beforeAssemblyReload += OnPreCompile;
            EditorApplication.delayCall += OnReload;

            void OnReload()
            {
                GcEditorSettings.Load();

                if (File.Exists(k_LaunchFlagPath))
                {
                    // script reload event
                    OnPostCompile();
                }
                else
                {
                    File.Create(k_LaunchFlagPath);

                    // editor launch event
                    OnLaunch();
                }

                GcEditorMenu.OnReload();
            };
        }
コード例 #2
0
            static void OnReload()
            {
                GcEditorSettings.Load();

                if (File.Exists(k_LaunchFlagPath))
                {
                    // script reload event
                    OnPostCompile();
                }
                else
                {
                    File.Create(k_LaunchFlagPath);

                    // editor launch event
                    OnLaunch();
                }

                GcEditorMenu.OnReload();
            };