Example #1
0
        public PrefItem(string key, T defaultValue, string text, string tooltip)
        {
            fade = new GUIFade();
            Key  = "HierarchyPreferences." + key;

            Preferences.allKeys[Preferences.currentKeyIndex++] = Key;

            Content      = new GUIContent(text, tooltip);
            DefaultValue = defaultValue;
        }
Example #2
0
        public PrefItem(string key, T defaultValue, string text = "", string tooltip = "")
        {
            this.key          = KEY_PREFIX + key;
            this.defaultValue = defaultValue;

            Label = new GUIContent(text, tooltip);
            fade  = new GUIFade();

            Preferences.onResetPreferences += ResetValue;

            if (UsingDefaultValue)
            {
                wrapper.value = Clone(defaultValue);
            }
            else
            {
                LoadValue();
            }
        }