s&box docs

public abstract class Sandbox.SerializedProperty

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

Methods

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

Obsolete: Best use TypeLibrary.CreateProperty

Parameters

  • attributes: Default: null

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.

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)

Parameters

  • defaultValue: Default: null

public virtual void Invoke()

If is method

protected virtual void NoteChanged()

Our value has changed, maybe our parent would like to know

protected virtual void NoteFinishEdit()

protected virtual void NotePreChange()

protected virtual void NoteStartEdit()

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

public bool ShouldShow()

Returns true if this property should be shown in the inspector

public virtual bool TryGetAsObject(Sandbox.SerializedObject obj)

Try to convert this property into a serialized object for further editing and exploration

public bool TryGetAttribute(T attribute)

Try to get this attribute from the property. Return false on fail.

protected T ValueToType(object value, T defaultValue = null)

Convert an object value to a T type

Parameters

  • defaultValue: Default: null

Properties

Showing 27 properties

public virtual bool Sandbox.SerializedProperty.HasChanges { get; set; }

Returns true if the current set value differs from the actual value

public virtual bool Sandbox.SerializedProperty.IsMultipleDifferentValues { get; set; }

True if this holds multiple values, and they're all different.

public virtual bool Sandbox.SerializedProperty.IsMultipleValues { get; set; }

True if this holds multiple values. That might all be the same.

public bool Sandbox.SerializedProperty.IsNullable { get; set; }

Return true if this is a nullable value type

public virtual System.Collections.Generic.IEnumerable`1<Sandbox.SerializedProperty> Sandbox.SerializedProperty.MultipleProperties { get; set; }

Get all properties if this holds multiple values

public System.Type Sandbox.SerializedProperty.NullableType { get; set; }

If this is a nullable type, this will return the nullable target type

public virtual string Sandbox.SerializedProperty.SourceFile { get; set; }

The source filename, if available

public virtual int Sandbox.SerializedProperty.SourceLine { get; set; }

The line in the source file, if available

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.SerializedProperty

On this page

Constructorspublic SerializedProperty()Methodspublic static Sandbox.SerializedProperty Create(System.String title, System.Func`1<T> get, System.Action`1<T> set, System.Attribute[] attributes = null)public virtual System.Collections.Generic.IEnumerable`1<System.Attribute> GetAttributes()public System.Collections.Generic.IEnumerable`1<System.Attribute> GetAttributes(System.Type t)public System.Collections.Generic.IEnumerable`1<T> GetAttributes()public Sandbox.SerializedProperty.CustomizableSerializedProperty GetCustomizable()public virtual System.Object GetDefault()public virtual Sandbox.SerializedProperty GetKey()public virtual T GetValue(T defaultValue = null)public System.Boolean HasAttribute(System.Type t)public System.Boolean HasAttribute()public virtual System.Void Invoke()protected virtual System.Void NoteChanged()protected virtual System.Void NoteFinishEdit()protected virtual System.Void NotePreChange()protected virtual System.Void NoteStartEdit()public System.Void SetNullState(System.Boolean isnull)public virtual System.Void SetValue(T value, Sandbox.SerializedProperty source)public virtual System.Void SetValue(T value)public System.Boolean ShouldShow()public virtual System.Boolean TryGetAsObject(Sandbox.SerializedObject obj)public System.Boolean TryGetAttribute(T attribute)protected T ValueToType(System.Object value, T defaultValue = null)Propertiespublic virtual Sandbox.SerializedProperty.AsAccessor Sandbox.SerializedProperty.As { get; set; }public virtual System.String Sandbox.SerializedProperty.Description { get; set; }public virtual System.String Sandbox.SerializedProperty.DisplayName { get; set; }public virtual System.String Sandbox.SerializedProperty.GroupName { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.HasChanges { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsEditable { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsField { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsMethod { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsMultipleDifferentValues { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsMultipleValues { get; set; }public System.Boolean Sandbox.SerializedProperty.IsNull { get; set; }public System.Boolean Sandbox.SerializedProperty.IsNullable { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsProperty { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsPublic { get; set; }public virtual System.Boolean Sandbox.SerializedProperty.IsValid { get; set; }public virtual System.Collections.Generic.IEnumerable`1<Sandbox.SerializedProperty> Sandbox.SerializedProperty.MultipleProperties { get; set; }public virtual System.String Sandbox.SerializedProperty.Name { get; set; }public System.Type Sandbox.SerializedProperty.NullableType { get; set; }public Sandbox.SerializedObject.PropertyChangedDelegate Sandbox.SerializedProperty.OnChanged { get; set; }public Sandbox.SerializedObject.PropertyFinishEditDelegate Sandbox.SerializedProperty.OnFinishEdit { get; set; }public Sandbox.SerializedObject.PropertyPreChangeDelegate Sandbox.SerializedProperty.OnPreChange { get; set; }public Sandbox.SerializedObject.PropertyStartEditDelegate Sandbox.SerializedProperty.OnStartEdit { get; set; }public virtual System.Int32 Sandbox.SerializedProperty.Order { get; set; }public virtual Sandbox.SerializedObject Sandbox.SerializedProperty.Parent { get; set; }public virtual System.Type Sandbox.SerializedProperty.PropertyType { get; set; }public virtual System.String Sandbox.SerializedProperty.SourceFile { get; set; }public virtual System.Int32 Sandbox.SerializedProperty.SourceLine { get; set; }Metadata