SerializedPropertyclass
Constructors1
Showing 1 constructors
public SerializedProperty()
No results match this filter.
Methods22
Showing 22 methods
public static Sandbox.SerializedProperty Create(string title, System.Func`1<T> get, System.Action`1<T> set, System.Attribute[] attributes = null)
Obsolete: Best use TypeLibrary.CreateProperty
| Parameter | Type | Description |
|---|---|---|
| title | string | — |
| get | Func<T> | — |
| set | Action<T> | — |
| attributes = null | Attribute[] | — |
public Sandbox.SerializedProperty.CustomizableSerializedProperty GetCustomizable()
Return a version of this property that can be customized for editor UI. You'll be able to change things like display name and tooltip, and add extra attributes that control how editor controls interact with it.
public virtual object GetDefault()
Get the default value of a specific property type.
object—public virtual Sandbox.SerializedProperty GetKey()
If this entry is a dictionary, we can get the key for it here
public virtual T GetValue(T defaultValue = null)
| Parameter | Type | Description |
|---|---|---|
| defaultValue = null | T | — |
T—public virtual void Invoke()
If is method
void—protected virtual void NoteChanged()
Our value has changed, maybe our parent would like to know
void—protected virtual void NoteFinishEdit()
void—protected virtual void NotePreChange()
void—protected virtual void NoteStartEdit()
void—public void SetNullState(bool isnull)
If this is a nullable type, you can use this to toggle between it being null or the default value type
| Parameter | Type | Description |
|---|---|---|
| isnull | bool | — |
void—public bool ShouldShow()
Returns true if this property should be shown in the inspector
bool—public virtual bool TryGetAsObject(Sandbox.SerializedObject obj)
Try to convert this property into a serialized object for further editing and exploration
| Parameter | Type | Description |
|---|---|---|
| obj | SerializedObject | — |
bool—public bool TryGetAttribute(T attribute)
Try to get this attribute from the property. Return false on fail.
| Parameter | Type | Description |
|---|---|---|
| attribute | T | — |
bool—protected T ValueToType(object value, T defaultValue = null)
Convert an object value to a T type
| Parameter | Type | Description |
|---|---|---|
| value | object | — |
| defaultValue = null | T | — |
T—No results match this filter.
Properties27
Showing 27 properties
public virtual Sandbox.SerializedProperty.AsAccessor Sandbox.SerializedProperty.As { get; set; }
public virtual string Sandbox.SerializedProperty.Description { get; set; }
string—public virtual string Sandbox.SerializedProperty.DisplayName { get; set; }
string—public virtual string Sandbox.SerializedProperty.GroupName { get; set; }
string—public virtual bool Sandbox.SerializedProperty.HasChanges { get; set; }
Returns true if the current set value differs from the actual value
bool—public virtual bool Sandbox.SerializedProperty.IsEditable { get; set; }
bool—public virtual bool Sandbox.SerializedProperty.IsField { get; set; }
bool—public virtual bool Sandbox.SerializedProperty.IsMethod { get; set; }
bool—public virtual bool Sandbox.SerializedProperty.IsMultipleDifferentValues { get; set; }
True if this holds multiple values, and they're all different.
bool—public virtual bool Sandbox.SerializedProperty.IsMultipleValues { get; set; }
True if this holds multiple values. That might all be the same.
bool—public bool Sandbox.SerializedProperty.IsNull { get; set; }
True if the value is null
bool—public bool Sandbox.SerializedProperty.IsNullable { get; set; }
Return true if this is a nullable value type
bool—public virtual bool Sandbox.SerializedProperty.IsProperty { get; set; }
bool—public virtual bool Sandbox.SerializedProperty.IsPublic { get; set; }
bool—public virtual bool Sandbox.SerializedProperty.IsValid { get; set; }
bool—public virtual System.Collections.Generic.IEnumerable`1<Sandbox.SerializedProperty> Sandbox.SerializedProperty.MultipleProperties { get; set; }
Get all properties if this holds multiple values
public virtual string Sandbox.SerializedProperty.Name { get; set; }
string—public System.Type Sandbox.SerializedProperty.NullableType { get; set; }
If this is a nullable type, this will return the nullable target type
public Sandbox.SerializedObject.PropertyChangedDelegate Sandbox.SerializedProperty.OnChanged { get; set; }
Called when the property value has changed.
public Sandbox.SerializedObject.PropertyFinishEditDelegate Sandbox.SerializedProperty.OnFinishEdit { get; set; }
Called when the property has finished being edited (eg. in a ControlWidget).
public Sandbox.SerializedObject.PropertyPreChangeDelegate Sandbox.SerializedProperty.OnPreChange { get; set; }
Called when the property value is about to change.
public Sandbox.SerializedObject.PropertyStartEditDelegate Sandbox.SerializedProperty.OnStartEdit { get; set; }
Called when the property is about to be edited (eg. in a ControlWidget).
public virtual int Sandbox.SerializedProperty.Order { get; set; }
int—public virtual Sandbox.SerializedObject Sandbox.SerializedProperty.Parent { get; set; }
public virtual System.Type Sandbox.SerializedProperty.PropertyType { get; set; }
public virtual string Sandbox.SerializedProperty.SourceFile { get; set; }
The source filename, if available
string—public virtual int Sandbox.SerializedProperty.SourceLine { get; set; }
The line in the source file, if available
int—No results match this filter.