public static QuickUnityEditorEventsWatcher Observe()
        {
            QuickUnityEditorEventsWatcher w = new QuickUnityEditorEventsWatcher();

            allWatchers.Add(w);
            return(w);
        }
Esempio n. 2
0
        static ProjectEditorViewWatcher()
        {
            QuickUnityEditorEventsWatcher watcher = QuickUnityEditorEventsWatcher.Observe();

            watcher.SceneView.OnSceneGUIDelegate.AddListener(onSceneViewGUI);
            watcher.PrefabUtility.OnPrefabInstanceUpdated.AddListener(OnPrefabInstanceUpdated);
            watcher.EditorApplication.OnPlayModeStateChanged.AddListener(OnPlayModeStateChanged);
        }
        static ProjectBuildTargetWatcher()
        {
            QuickUnityEditorEventsWatcher watcher = QuickUnityEditorEventsWatcher.Observe();

            watcher.BuildTarget.OnBuildTargetChanged.AddListener(target =>
            {
                Debug.Log("Switch Platform Successed, Current Platform : {0}", target);
            });
        }
Esempio n. 4
0
        //public enum CompilerOptions
        //{
        //    ForceStopPlay,
        //    LockReloadAssemblies
        //}

        //private static CompilerOptions mCompiler = CompilerOptions.ForceStopPlay;
        //private static bool mIsLockReloadAssemblies = false;
        //private static bool mIsImportScripts = false;

        static UnityScripsCompileWatcher()
        {
            QuickUnityEditorEventsWatcher mEventWatcher = QuickUnityEditorEventsWatcher.Observe();

            mEventWatcher.EditorApplication.OnUpdate.AddListener(onEditorUpdate);

            //QuickAssetWatcher watcher = QuickAssetWatcher.Observe();
            //watcher.onAssetCreated.AddListener(onAssetHandle);
            //watcher.onAssetModified.AddListener(onAssetHandle);

            UnityScripsCompileTimeTracker.KeyframeAdded += UnityScripsCompileWatcher.LogCompileTimeKeyframe;
        }
Esempio n. 5
0
        private static void OnPrefabInstanceUpdated(GameObject instance)
        {
            GameObject go = null;

            if (Selection.activeTransform)
            {
                go = Selection.activeGameObject;
            }
            AssetDatabase.SaveAssets();
            if (go)
            {
                QuickUnityEditorEventsWatcher.Observe().EditorApplication.OnDelayCall.AddListener(delegate
                {
                    Selection.activeGameObject = go;
                });
            }
        }
Esempio n. 6
0
        static QuickSDKBuildWatcher()
        {
            QuickUnityEditorEventsWatcher watcher = QuickUnityEditorEventsWatcher.Observe();

            watcher.QuickSDKBuildPipeline.OnPreApply.AddListener((target, path) =>
            {
                Debug.Log("QuickSDKBuildPipeline -> OnPreApply : {0}, {1}", target, path);
            });
            watcher.QuickSDKBuildPipeline.OnApplySDK.AddListener((target, path) =>
            {
                Debug.Log("QuickSDKBuildPipeline -> OnApplySDK : {0}, {1}", target, path);
            });
            watcher.QuickSDKBuildPipeline.OnPreBuild.AddListener((target, path) =>
            {
                Debug.Log("QuickSDKBuildPipeline -> OnPreBuild : {0}, {1}", target, path);
            });
            watcher.QuickSDKBuildPipeline.OnPostBuild.AddListener((target, path) =>
            {
                Debug.Log("QuickSDKBuildPipeline -> OnPostBuild : {0}, {1}", target, path);
            });
        }
Esempio n. 7
0
        static ProjectWindowWatcher()
        {
            QuickUnityEditorEventsWatcher watcher = QuickUnityEditorEventsWatcher.Observe();

            watcher.ProjectView.OnProjectWindowItemOnGUI.AddListener(ProjectWindowItemOnGUI);
        }
 private static void RemoveWatcher(QuickUnityEditorEventsWatcher watcher)
 {
     allWatchers.Remove(watcher);
 }