public void Save() { EditorPrefs.SetBool(name, configuration); Debug.LogFormat("{0} - {1} has changed to {2}", EditorColorConfiguration.TagText("Configuration"), name, EditorColorConfiguration.GetToggleText(configuration)); }
private static void LockCheck() { if (!locked && config != null && config.Enabled && EditorApplication.isPlaying && EditorApplication.isCompiling) { locked = true; EditorApplication.LockReloadAssemblies(); EditorApplication.playModeStateChanged += PlaymodeChanged; Debug.Log(EditorColorConfiguration.TagText("Assembly Lock") + " Preventing assembly reload"); } }
private static void PlaymodeChanged(PlayModeStateChange state) { if (!EditorApplication.isPlaying) { locked = false; Debug.Log(EditorColorConfiguration.TagText("Assembly Lock") + " Unlocking assemblies to reload"); EditorApplication.UnlockReloadAssemblies(); EditorApplication.playModeStateChanged -= PlaymodeChanged; } }
public void Print() { var result = EditorColorConfiguration.TagText("Code Statistics"); result += string.Format(" - Lines of code\t({0:N0})", linesOfCode); result += string.Format("\n - Scripts\t\t\t({0:N0})", scripts); result += string.Format("\n - Lines of actual code\t\t({0:N0})", codeLines); result += string.Format("\n - Lines of comments\t\t({0:N0})", commentLines); result += string.Format("\n - Empty Lines\t\t({0:N0})", emptyLines); result += string.Format("\n - Percentage Of Lines is code\t({0:P})", (double)codeLines / (double)linesOfCode); Debug.Log(result); }
private static void Save() { AssetDatabase.SaveAssets(); UnityEngine.Debug.Log(EditorColorConfiguration.TagText("Autosave") + " - Saving..."); }