static ProjectAssetsWatcher()
        {
            QuickAssetWatcher watcher = QuickAssetWatcher.Observe();

            watcher.OnAssetCreated.AddListener(asset =>
            {
                Debug.Log("<color=cyan>Created</color> asset {0} of type {1}", asset.Name, asset.Type);
            });

            watcher.OnAssetDeleted.AddListener(asset =>
            {
                Debug.Log("<color=red>Deleted</color> asset {0} of type {1}", asset.Name, asset.Type);
            });

            watcher.OnAssetModified.AddListener(asset =>
            {
                Debug.Log("<color=orange>Modified</color> asset {0} of type {1}", asset.Name, asset.Type);
            });

            watcher.OnAssetMoved.AddListener((before, after) =>
            {
                Debug.Log("<color=blue>Moved</color> asset {0} from {1} to {2}", before.Name, before.DirectoryName, after.DirectoryName);
            });

            watcher.OnAssetRenamed.AddListener((before, after) =>
            {
                Debug.Log("<color=magenta>Renamed</color> asset from {0} to {1}", before.Name, after.Name);
            });
        }
        static ProjectBuildTargetWatcher()
        {
            QuickUnityEditorEventsWatcher watcher = QuickUnityEditorEventsWatcher.Observe();

            watcher.BuildTarget.OnBuildTargetChanged.AddListener(target =>
            {
                Debug.Log("Switch Platform Successed, Current Platform : {0}", target);
            });
        }
Exemplo n.º 3
0
        private static void LogCompileTimeKeyframe(UnityScripsCompileTimeKeyframe keyframe)
        {
            string compilationFinishedLog = "Compilation Finished, Elapsed time : " + TrackingUtils.FormatMSTime(keyframe.elapsedCompileTimeInMS);

            if (keyframe.hadErrors)
            {
                compilationFinishedLog += " (error)";
            }
            Debug.Log("<color=green>Unity Scripts Compiling Completed. </color>" + compilationFinishedLog);
        }
Exemplo n.º 4
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);
            });
        }
        public static string[] OnWillSaveAssets(string[] paths)
        {
            List <string> result = new List <string>();

            foreach (var path in paths)
            {
                if (IsUnlocked(path))
                {
                    result.Add(path);
                }
                else
                {
                    Debug.LogError(path + " is read-only.");
                }
                if (path.EndsWith(".unity"))
                {
                    Scene scene = SceneManager.GetSceneByPath(path);
                    Debug.Log("Currernt Save Scene :" + scene.name);
                }
            }
            return(result.ToArray());
        }
Exemplo n.º 6
0
 private static void OnPlayModeStateChanged(QuickUnityEditorEventsWatcher.PlayModeState arg0)
 {
     Debug.Log("Editor PlayModeState: {0}", arg0);
 }
Exemplo n.º 7
0
 private static void OnUnityScripsCompilingCompleted()
 {
     Debug.Log("<color=green>Unity Scripts Compiling Completed.</color>");
 }