Class SuperSerializedProperty
- Namespace
- LoM.Super.Serialization
- Assembly
- Assembly-CSharp-Editor-firstpass.dll
SuperSerializedProperty and SuperSerializedObject are classes for editing properties on
objects in a completely generic way that automatically handles undo, multi-object
editing and Prefab overrides.
Unlike the SerializedObject and SerializedProperty classes provided by Unity,
this class supports Properties and Fields
public class SuperSerializedProperty
- Inheritance
-
SuperSerializedProperty
Properties
Attributes
public SerializedAttributes Attributes { get; }
Property Value
Field
public SerializedProperty Field { get; }
Property Value
Info
public MemberInfo Info { get; }
Property Value
IsField
public bool IsField { get; }
Property Value
Type
Type of the property. (Read Only)
public Type Type { get; }
Property Value
animationCurveValue
Value of a animation curve property.
public AnimationCurve animationCurveValue { get; set; }
Property Value
arrayElementType
Type name of the element in an array property. (Read Only)
public string arrayElementType { get; }
Property Value
arraySize
The number of elements in the array.
public int arraySize { get; set; }
Property Value
boolValue
Value of a boolean property.
public bool boolValue { get; set; }
Property Value
boundsIntValue
Value of bounds with integer values property.
public BoundsInt boundsIntValue { get; set; }
Property Value
boundsValue
Value of bounds property.
public Bounds boundsValue { get; set; }
Property Value
boxedValue
Value of the SerializedProperty, boxed as a System.Object.
public object boxedValue { get; set; }
Property Value
colorValue
Value of a color property.
public Color colorValue { get; set; }
Property Value
contentHash
Provides the hash value for the property. (Read Only)
public uint contentHash { get; }
Property Value
depth
Nesting depth of the property. (Read Only)
public int depth { get; }
Property Value
displayName
Nice display name of the property. (Read Only)
public string displayName { get; }
Property Value
doubleValue
Value of a float property as a double.
public double doubleValue { get; set; }
Property Value
editable
Is this property editable? (Read Only)
public bool editable { get; }
Property Value
enumDisplayNames
Display-friendly names of enumeration of an enum property.
public string[] enumDisplayNames { get; }
Property Value
- string[]
enumNames
Names of enumeration of an enum property.
public string[] enumNames { get; }
Property Value
- string[]
enumValueFlag
Int32 representation of an enum property with Mixed Values.
public int enumValueFlag { get; set; }
Property Value
enumValueIndex
Enum index of an enum property.
public int enumValueIndex { get; set; }
Property Value
exposedReferenceValue
A reference to another Object in the Scene. This reference is resolved in the context of the SerializedObject containing the SerializedProperty.
public Object exposedReferenceValue { get; set; }
Property Value
fixedBufferSize
The number of elements in the fixed buffer. (Read Only)
public int fixedBufferSize { get; }
Property Value
floatValue
Value of a float property.
public float floatValue { get; set; }
Property Value
gradientValue
Value of a gradient property.
public Gradient gradientValue { get; set; }
Property Value
- Gradient
hasChildren
Does it have child properties? (Read Only)
public bool hasChildren { get; }
Property Value
hasMultipleDifferentValues
Does this property represent multiple different values due to multi-object editing? (Read Only)
public bool hasMultipleDifferentValues { get; }
Property Value
hasVisibleChildren
Does it have visible child properties? (Read Only)
public bool hasVisibleChildren { get; }
Property Value
hash128Value
The value of a Hash128 property.
public Hash128 hash128Value { get; set; }
Property Value
- Hash128
intValue
Value of an integer property.
public int intValue { get; set; }
Property Value
isAnimated
public bool isAnimated { get; }
Property Value
isArray
Is this property an array? (Read Only)
public bool isArray { get; }
Property Value
isDefaultOverride
Allows you to check whether his property is a PrefabUtility.IsDefaultOverride|default override. Certain properties on Prefab instances are default overrides. See PrefabUtility.IsDefaultOverride for more information.
public bool isDefaultOverride { get; }
Property Value
isExpanded
Is this property expanded in the inspector?
public bool isExpanded { get; set; }
Property Value
isFixedBuffer
Is this property a fixed buffer? (Read Only)
public bool isFixedBuffer { get; }
Property Value
isInstantiatedPrefab
Is property part of a Prefab instance? (Read Only)
public bool isInstantiatedPrefab { get; }
Property Value
longValue
Value of an integer property as a long.
public long longValue { get; set; }
Property Value
managedReferenceFieldTypename
String corresponding to the value of the managed reference field full type string.
public string managedReferenceFieldTypename { get; }
Property Value
managedReferenceFullTypename
String corresponding to the value of the managed reference object (dynamic) full type string.
public string managedReferenceFullTypename { get; }
Property Value
managedReferenceId
Id associated with a managed reference.
public long managedReferenceId { get; set; }
Property Value
managedReferenceValue
The object assigned to a field with SerializeReference attribute.
public object managedReferenceValue { get; set; }
Property Value
minArraySize
The smallest number of elements in the array across all target objects. (Read Only)
public int minArraySize { get; }
Property Value
name
Name of the property. (Read Only)
public string name { get; }
Property Value
numericType
Return the precise type for Integer and Floating point properties. (Read Only)
public SerializedPropertyNumericType numericType { get; }
Property Value
objectReferenceInstanceIDValue
Object ID of an object reference property.
public int objectReferenceInstanceIDValue { get; set; }
Property Value
objectReferenceValue
Value of an object reference property.
public Object objectReferenceValue { get; set; }
Property Value
prefabOverride
Allows you to check whether a property's value is overriden (i.e. different to the Prefab it belongs to).
public bool prefabOverride { get; set; }
Property Value
propertyPath
Full path of the property. (Read Only)
public string propertyPath { get; }
Property Value
propertyType
Type of this property (Read Only).
public SerializedPropertyType propertyType { get; }
Property Value
quaternionValue
Value of a quaternion property.
public Quaternion quaternionValue { get; set; }
Property Value
rectIntValue
Value of a rectangle with integer values property.
public RectInt rectIntValue { get; set; }
Property Value
rectValue
Value of a rectangle property.
public Rect rectValue { get; set; }
Property Value
serializedObject
SerializedObject this property belongs to (Read Only).
public SerializedObject serializedObject { get; }
Property Value
stringValue
Value of a string property.
public string stringValue { get; set; }
Property Value
superSerializedObject
SerializedObject this property belongs to (Read Only).
public SuperSerializedObject superSerializedObject { get; }
Property Value
tooltip
Tooltip of the property. (Read Only)
public string tooltip { get; }
Property Value
type
Type name of the property. (Read Only)
public string type { get; }
Property Value
uintValue
Value of an integer property as an unsigned int.
public uint uintValue { get; set; }
Property Value
ulongValue
Value of an integer property as an unsigned long.
public ulong ulongValue { get; set; }
Property Value
vector2IntValue
Value of a 2D integer vector property.
public Vector2Int vector2IntValue { get; set; }
Property Value
vector2Value
Value of a 2D vector property.
public Vector2 vector2Value { get; set; }
Property Value
vector3IntValue
Value of a 3D integer vector property.
public Vector3Int vector3IntValue { get; set; }
Property Value
- Vector3Int
vector3Value
Value of a 3D vector property.
public Vector3 vector3Value { get; set; }
Property Value
- Vector3
vector4Value
Value of a 4D vector property.
public Vector4 vector4Value { get; set; }
Property Value
- Vector4
Methods
ClearArray()
Remove all elements from the array.
public void ClearArray()
Copy()
[Obsolete("Use SuperSerializedProperty.CopyPropery() instead.")]
public SerializedProperty Copy()
Returns
CopyPropery()
Returns a copy of the SerializedProperty iterator in its current state.
public SuperSerializedProperty CopyPropery()
Returns
CountInProperty()
Count visible children of this property, including this property itself.
public int CountInProperty()
Returns
CountRemaining()
Count remaining visible properties.
public int CountRemaining()
Returns
DataEquals(SerializedProperty, SerializedProperty)
Compares the data for two SerializedProperties. This method ignores paths and SerializedObjects.
public static bool DataEquals(SerializedProperty x, SerializedProperty y)
Parameters
Returns
DeleteArrayElementAtIndex(int)
Delete the element at the specified index in the array.
public void DeleteArrayElementAtIndex(int index)
Parameters
index
int
DeleteCommand()
Deletes the array element referenced by the SerializedProperty.
public bool DeleteCommand()
Returns
Dispose()
public void Dispose()
DuplicateCommand()
Duplicates the array element referenced by the SerializedProperty.
public bool DuplicateCommand()
Returns
EqualContents(SerializedProperty, SerializedProperty)
See if contained serialized properties are equal.
public static bool EqualContents(SerializedProperty x, SerializedProperty y)
Parameters
Returns
FindPropertyRelative(string)
Retrieves the SerializedProperty at a relative path to the current property.
public SerializedProperty FindPropertyRelative(string relativePropertyPath)
Parameters
relativePropertyPath
string
Returns
GetArrayElementAtIndex(int)
Returns the element at the specified index in the array.
public SerializedProperty GetArrayElementAtIndex(int index)
Parameters
index
int
Returns
GetEndProperty()
Retrieves the SerializedProperty that defines the end range of this property.
public SerializedProperty GetEndProperty()
Returns
GetEndProperty(bool)
Retrieves the SerializedProperty that defines the end range of this property.
public SerializedProperty GetEndProperty(bool includeInvisible)
Parameters
includeInvisible
bool
Returns
GetEnumerator()
Retrieves an iterator for enumerating over the visible child properties of the current property. If the property is an array it will enumerate over the array elements.
public IEnumerator GetEnumerator()
Returns
GetFixedBufferElementAtIndex(int)
Returns the element at the specified index in the fixed buffer.
public SerializedProperty GetFixedBufferElementAtIndex(int index)
Parameters
index
int
Returns
InsertArrayElementAtIndex(int)
Insert an new element at the specified index in the array.
public void InsertArrayElementAtIndex(int index)
Parameters
index
int
MoveArrayElement(int, int)
Move an array element from srcIndex to dstIndex.
public bool MoveArrayElement(int srcIndex, int dstIndex)
Parameters
Returns
Next(bool)
Move to next property.
public bool Next(bool enterChildren)
Parameters
enterChildren
bool
Returns
NextVisible(bool)
Move to next visible property.
public bool NextVisible(bool enterChildren)
Parameters
enterChildren
bool
Returns
Reevaluate()
Trigger re-evaluation of all condition attributes on this property.
public void Reevaluate()
Reset()
Move to first property of the object.
public void Reset()
Operators
implicit operator SerializedProperty(SuperSerializedProperty)
public static implicit operator SerializedProperty(SuperSerializedProperty superSerializedProperty)
Parameters
superSerializedProperty
SuperSerializedProperty