123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- using System;
- using UnityEngine;
- namespace UnityEditor.SettingsManagement
- {
-
-
-
- [AttributeUsage(AttributeTargets.Field)]
- public sealed class UserSettingAttribute : Attribute
- {
- string m_Category;
- GUIContent m_Title;
- bool m_VisibleInSettingsProvider;
-
-
-
-
-
-
- public string category
- {
- get { return m_Category; }
- }
-
-
-
- public GUIContent title
- {
- get { return m_Title; }
- }
-
-
-
- public bool visibleInSettingsProvider
- {
- get { return m_VisibleInSettingsProvider; }
- }
-
-
-
- public UserSettingAttribute()
- {
- m_VisibleInSettingsProvider = false;
- }
-
-
-
- public UserSettingAttribute(string category, string title, string tooltip = null)
- {
- m_Category = category;
- m_Title = new GUIContent(title, tooltip);
- m_VisibleInSettingsProvider = true;
- }
- }
-
-
-
-
-
- [AttributeUsage(AttributeTargets.Field)]
- public sealed class SettingsKeyAttribute : Attribute
- {
- string m_Key;
- SettingsScope m_Scope;
-
-
-
- public string key
- {
- get { return m_Key; }
- }
-
-
-
- public SettingsScope scope
- {
- get { return m_Scope; }
- }
-
-
-
-
-
-
- public SettingsKeyAttribute(string key, SettingsScope scope = SettingsScope.Project)
- {
- m_Key = key;
- m_Scope = scope;
- }
- }
-
-
-
- [AttributeUsage(AttributeTargets.Method)]
- public sealed class UserSettingBlockAttribute : Attribute
- {
- string m_Category;
-
-
-
-
-
-
- public string category
- {
- get { return m_Category; }
- }
-
-
-
-
-
-
-
-
- public UserSettingBlockAttribute(string category)
- {
- m_Category = category;
- }
- }
- }
|