示例#1
0
        public static bool Header(string text, string key, Color?color = null, bool defaultState = true)
        {
            var state = ProjectPrefs.GetBool(key, defaultState);

            EditorGUI.BeginChangeCheck();

            state = Header(text, state, color);

            if (EditorGUI.EndChangeCheck())
            {
                ProjectPrefs.SetBool(key, state);
            }

            return(state);
        }
        public static bool DrawHeader(string text, string key, Color?color = null)
        {
            var state = ProjectPrefs.GetBool(key, true);

            GUI.changed = false;

            state = DrawHeader(text, state, color);

            if (GUI.changed)
            {
                ProjectPrefs.SetBool(key, state);
            }

            return(state);
        }
示例#3
0
 public static void ToggleTuningLog()
 {
     LogEnable = !LogEnable;
     ProjectPrefs.SetBool(PrefsKey, LogEnable);
 }