This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class EditorStatus | |
| { | |
| public static bool IsEditorBusy() | |
| { | |
| return EditorApplication.isCompiling || | |
| EditorApplication.isPlayingOrWillChangePlaymode || | |
| EditorApplication.isUpdating || | |
| EditorApplication.isSceneOpening || | |
| AssetDatabase.IsAssetImportWorkerBusy(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class ScalpXServiceLocator : Singleton<ScalpXServiceLocator> | |
| { | |
| /// <summary> | |
| /// currently registered services. | |
| /// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// A faster implementation of deepclone using binary formatter | |
| /// </summary> | |
| /// <param name="obj">Object to be cloned</param> | |
| /// <returns></returns> | |
| public static T DeepClone<T>(this T obj) | |
| { | |
| using (var ms = new MemoryStream()) | |
| { | |
| var formatter = new BinaryFormatter(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// A faster implementation of deepclone using binary formatter | |
| /// </summary> | |
| /// <param name="obj">Object to be cloned</param> | |
| /// <returns></returns> | |
| public static T DeepClone<T>(this T obj) | |
| { | |
| using (var ms = new MemoryStream()) | |
| { | |
| var formatter = new BinaryFormatter(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |