SerializedPropertyclass

object→SerializedProperty
Namespace
Sandbox
Assembly
Sandbox.System
Declaration
public abstract class Sandbox.SerializedProperty

Constructors1

Showing 1 constructors

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)PUBLICSTATICOBSOLETE

Obsolete: Best use TypeLibrary.CreateProperty

ParameterTypeDescription
titlestring—
getFunc<T>—
setAction<T>—
attributes = nullAttribute[]—

public virtual object GetDefault()PUBLICVIRTUAL

Get the default value of a specific property type.

Returns:object—

public virtual T GetValue(T defaultValue = null)PUBLICVIRTUAL

ParameterTypeDescription
defaultValue = nullT—
Returns:T—

public virtual void Invoke()PUBLICVIRTUAL

If is method

Returns:void—

protected virtual void NoteChanged()PROTECTEDVIRTUAL

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

Returns:void—

protected virtual void NoteFinishEdit()PROTECTEDVIRTUAL

Returns:void—

protected virtual void NotePreChange()PROTECTEDVIRTUAL

Returns:void—

protected virtual void NoteStartEdit()PROTECTEDVIRTUAL

Returns:void—

public void SetNullState(bool isnull)PUBLIC

If this is a nullable type, you can use this to toggle between it being null or the default value type

ParameterTypeDescription
isnullbool—
Returns:void—

public bool ShouldShow()PUBLIC

Returns true if this property should be shown in the inspector

Returns:bool—

public virtual bool TryGetAsObject(Sandbox.SerializedObject obj)PUBLICVIRTUAL

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

ParameterTypeDescription
objSerializedObject—
Returns:bool—

public bool TryGetAttribute(T attribute)PUBLIC

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

ParameterTypeDescription
attributeT—
Returns:bool—

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

Convert an object value to a T type

ParameterTypeDescription
valueobject—
defaultValue = nullT—
Returns:T—

Properties27

Showing 27 properties

public virtual string Sandbox.SerializedProperty.Description { get; set; }PUBLICVIRTUALGETSET

Returns:string—

public virtual string Sandbox.SerializedProperty.DisplayName { get; set; }PUBLICVIRTUALGETSET

Returns:string—

public virtual string Sandbox.SerializedProperty.GroupName { get; set; }PUBLICVIRTUALGETSET

Returns:string—

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

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

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsEditable { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsField { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsMethod { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

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

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

Returns:bool—

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

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

Returns:bool—

public bool Sandbox.SerializedProperty.IsNull { get; set; }PUBLICGETSET

True if the value is null

Returns:bool—

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

Return true if this is a nullable value type

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsProperty { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsPublic { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

public virtual bool Sandbox.SerializedProperty.IsValid { get; set; }PUBLICVIRTUALGETSET

Returns:bool—

public virtual string Sandbox.SerializedProperty.Name { get; set; }PUBLICVIRTUALGETSET

Returns:string—

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

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

Returns:Type—

public virtual int Sandbox.SerializedProperty.Order { get; set; }PUBLICVIRTUALGETSET

Returns:int—

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

The source filename, if available

Returns:string—

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

The line in the source file, if available

Returns:int—

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