public abstract class Sandbox.SerializedProperty
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public SerializedProperty()
No results match this filter.
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
No results match this filter.
Properties
Showing 27 properties
public virtual Sandbox.SerializedProperty.AsAccessor Sandbox.SerializedProperty.As { get; set; }
public virtual string Sandbox.SerializedProperty.Description { get; set; }
public virtual string Sandbox.SerializedProperty.DisplayName { get; set; }
public virtual string Sandbox.SerializedProperty.GroupName { get; set; }
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.IsEditable { get; set; }
public virtual bool Sandbox.SerializedProperty.IsField { get; set; }
public virtual bool Sandbox.SerializedProperty.IsMethod { get; set; }
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.IsNull { get; set; }
True if the value is null
public bool Sandbox.SerializedProperty.IsNullable { get; set; }
Return true if this is a nullable value type
public virtual bool Sandbox.SerializedProperty.IsProperty { get; set; }
public virtual bool Sandbox.SerializedProperty.IsPublic { get; set; }
public virtual bool Sandbox.SerializedProperty.IsValid { get; set; }
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; }
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; }
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
public virtual int Sandbox.SerializedProperty.SourceLine { get; set; }
The line in the source file, if available
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Sandbox.SerializedProperty |