Version 3.3.1.2

ProjectSetting<T> class

Namespace: Sirenix.OdinInspector.Editor.Internal
Assembly: Sirenix.OdinInspector.Editor
[InlineProperty]
public abstract class ProjectSetting<T> : IProjectSetting
Inheritance
  • System.Object
  • ProjectSetting<T>

Type Parameters

T

Constructors

ProjectSetting()
public ProjectSetting()
ProjectSetting(String, T, Object)
public ProjectSetting(string key, T defaultValue, Object serializedContainer)
Parameters
System.String key

T defaultValue

UnityEngine.Object serializedContainer

Properties

IsDefault
public bool IsDefault { get; }
Key
public string Key { get; }
LocalOverride
[ShowInInspector]
[HorizontalGroup(20F, 0, 0, 0F)]
[HideLabel]
public bool LocalOverride { get; set; }
Value
[HorizontalGroup(0F, 0, 0, 0F)]
[HideLabel]
[SuppressInvalidAttributeError]
[InlineProperty]
[ShowInInspector]
public T Value { get; set; }

Methods

DeleteLocalValue()
public void DeleteLocalValue()
Draw(Rect, T, GUIContent)
protected abstract T Draw(Rect rect, T value, GUIContent label)
Parameters
UnityEngine.Rect rect

T value

UnityEngine.GUIContent label

Returns
T

Draw(Rect, String, String, Boolean, Boolean)
public void Draw(Rect rect, string label, string tooltip, bool drawLocalOverride, bool allowBold = true)
Parameters
UnityEngine.Rect rect

System.String label

System.String tooltip

System.Boolean drawLocalOverride

System.Boolean allowBold

Equals(T, T)
protected virtual bool Equals(T a, T b)
Parameters
T a

T b

Returns
System.Boolean

GetLocalValue(String, T)
protected abstract T GetLocalValue(string key, T defaultValue)
Parameters
System.String key

T defaultValue

Returns
T

Reset()
public void Reset()
SetLocalValue(String, T)
protected abstract void SetLocalValue(string key, T value)
Parameters
System.String key

T value

Operators

Implicit(ProjectSetting<T> to T)
public static implicit operator T(ProjectSetting<T> projectSetting)
Parameters
ProjectSetting<T> projectSetting

Returns
T