SuperBehaviour SuperBehaviour
SuperBehaviour SuperBehaviour
v0.1.2 [Beta]

Search Results for

    Class SuperSerializedObject

    Namespace
    LoM.Super.Serialization
    Assembly
    LoM.Super.Editor.dll

    SuperSerializedObject and SuperSerializedProperty are classes for editing serialized field on Object|Unity objects in a completely generic way. These classes automatically handle dirtying individual serialized fields so they will be processed by the Undo system and styled correctly for Prefab overrides when drawn in the Inspector.
    Unlike the SerializedObject and SerializedProperty classes provided by Unity, this class supports Properties and Fields

    public class SuperSerializedObject : SerializedObject
    Inheritance
    object
    SerializedObject
    SuperSerializedObject

    Constructors

    SuperSerializedObject(Object)

    Create SerializedObject for inspected object.

    public SuperSerializedObject(Object obj)

    Parameters

    obj Object

    SuperSerializedObject(Object, Object)

    Create SerializedObject for inspected object by specifying a context to be used to store and resolve ExposedReference types.

    public SuperSerializedObject(Object obj, Object context)

    Parameters

    obj Object
    context Object

    SuperSerializedObject(Object[])

    Create SerializedObject for inspected object.

    public SuperSerializedObject(Object[] objs)

    Parameters

    objs Object[]

    SuperSerializedObject(Object[], Object)

    Create SerializedObject for inspected object by specifying a context to be used to store and resolve ExposedReference types.

    public SuperSerializedObject(Object[] objs, Object context)

    Parameters

    objs Object[]
    context Object

    Properties

    All

    public SuperSerializedProperty[] All { get; }

    Property Value

    SuperSerializedProperty[]

    Fields

    public SuperSerializedProperty[] Fields { get; }

    Property Value

    SuperSerializedProperty[]

    Methods

    public MethodInfo[] Methods { get; }

    Property Value

    MethodInfo[]

    Properties

    public SuperSerializedProperty[] Properties { get; }

    Property Value

    SuperSerializedProperty[]

    Type

    public Type Type { get; }

    Property Value

    Type

    TypeName

    public string TypeName { get; }

    Property Value

    string

    context

    The context used to store and resolve ExposedReference types. This is set by the SerializedObject constructor.

    public Object context { get; }

    Property Value

    Object

    forceChildVisibility

    Controls the visibility of the child hidden fields.

    public bool forceChildVisibility { get; }

    Property Value

    bool

    hasModifiedProperties

    Is true when the SerializedObject has a modified property that has not been applied.

    public bool hasModifiedProperties { get; }

    Property Value

    bool

    isEditingMultipleObjects

    Does the serialized object represents multiple objects due to multi-object editing? (Read Only)

    public bool isEditingMultipleObjects { get; }

    Property Value

    bool

    maxArraySizeForMultiEditing

    Defines the maximum size beyond which arrays cannot be edited when multiple objects are selected.

    public int maxArraySizeForMultiEditing { get; }

    Property Value

    int

    targetObject

    The inspected objects (Read Only).

    public Object targetObject { get; }

    Property Value

    Object

    targetObjects

    The inspected object (Read Only).

    public Object[] targetObjects { get; }

    Property Value

    Object[]

    Methods

    ApplyModifiedProperties()

    Apply property modifications.

    public bool ApplyModifiedProperties()

    Returns

    bool

    ApplyModifiedPropertiesWithoutUndo()

    Applies property modifications without registering an undo operation.

    public bool ApplyModifiedPropertiesWithoutUndo()

    Returns

    bool

    CopyFromSerializedProperty(SerializedProperty)

    Copies a value from a SerializedProperty to the corresponding serialized property on the serialized object.

    public void CopyFromSerializedProperty(SerializedProperty prop)

    Parameters

    prop SerializedProperty

    CopyFromSerializedPropertyIfDifferent(SerializedProperty)

    Copies a changed value from a SerializedProperty to the corresponding serialized property on the serialized object.

    public bool CopyFromSerializedPropertyIfDifferent(SerializedProperty prop)

    Parameters

    prop SerializedProperty

    Returns

    bool

    Dispose()

    public void Dispose()

    FindAllPropertiesByPath(string)

    public SuperSerializedProperty[] FindAllPropertiesByPath(string propertyPath)

    Parameters

    propertyPath string

    Returns

    SuperSerializedProperty[]

    FindProperty(string)

    [Obsolete("Use FindPropertyByPath instead.", false)]
    public SerializedProperty FindProperty(string propertyPath)

    Parameters

    propertyPath string

    Returns

    SerializedProperty

    FindPropertyByPath(string)

    Find serialized property by name.

    public SuperSerializedProperty FindPropertyByPath(string propertyPath)

    Parameters

    propertyPath string

    Returns

    SuperSerializedProperty

    GetIterator()

    Get the first serialized property.

    public SerializedProperty GetIterator()

    Returns

    SerializedProperty

    InvokeMethod(string)

    Invoke a method on the target object / objects.

    public void InvokeMethod(string methodName)

    Parameters

    methodName string

    Name of the method to be invoked

    InvokeMethod(string, Object)

    Invoke a method on a specific target object.

    public void InvokeMethod(string methodName, Object obj)

    Parameters

    methodName string

    Name of the method to be invoked

    obj Object

    Target object

    InvokeMethod<T>(string, params object[])

    Invoke a method on the target object / objects with parameters.

    public T InvokeMethod<T>(string methodName, params object[] parameters)

    Parameters

    methodName string

    Name of the method to be invoked

    parameters object[]

    Parameters to be passed to the method

    Returns

    T

    Return value of the method

    Type Parameters

    T

    Type of the parameter

    InvokeMethod<T>(string, Object, params object[])

    Invoke a method on a specific target object with parameters.

    public T InvokeMethod<T>(string methodName, Object obj, params object[] parameters)

    Parameters

    methodName string

    Name of the method to be invoked

    obj Object

    Target object

    parameters object[]

    Parameters to be passed to the method

    Returns

    T

    Return value of the method

    Type Parameters

    T

    Type of the parameter

    SetIsDifferentCacheDirty()

    Update hasMultipleDifferentValues cache on the next Update() call.

    public void SetIsDifferentCacheDirty()

    Update()

    Update serialized object's representation.

    public void Update()

    UpdateIfDirtyOrScript()

    This has been made obsolete. See SerializedObject.UpdateIfRequiredOrScript instead.

    [Obsolete("UpdateIfDirtyOrScript has been deprecated. Use UpdateIfRequiredOrScript instead.", false)]
    public void UpdateIfDirtyOrScript()

    UpdateIfRequiredOrScript()

    Update serialized object's representation, only if the object has been modified since the last call to Update or if it is a script.

    public void UpdateIfRequiredOrScript()
    © Lords of Mahlstrom Gaming, all rights reserved.