Serialization.

Serialization.CollectionPropertyAccessor Class

Summary

[Editor-Only] A InspectorGadgets.Editor.Serialization.PropertyAccessor for a specific element index in a collection.
graph BT Type-->Base0["Serialization.PropertyAccessor"] click Base0 "/inspector-gadgets/api/InspectorGadgets.Editor/PropertyAccessor" Base0-->Base1["Object"] Type["Serialization.CollectionPropertyAccessor"] class Type type-node

Syntax

public class Serialization.CollectionPropertyAccessor : Serialization.PropertyAccessor

Fields

Name Constant Value Summary
ElementIndex
The index of the array element this accessor targets.
Field
The field wrapped by this accessor.
FieldElementType
The type of the wrapped InspectorGadgets.Editor.Serialization.PropertyAccessor.Field. Or if it's a collection, this is the type of items in the collection.
IsDynamic
Does the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field in this accessor or any InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent have a UnityEngine.SerializeReference attribute?
Name
The name of the field wrapped by this accessor.
Parent
The accessor for the field which this accessor is nested inside.

Methods

Name Value Summary
GetCollection(Object) Object
Returns the collection object targeted by this accessor.
GetCollectionPath() string
Returns the UnityEditor.SerializedProperty.propertyPath of the array containing the target.
GetElementType(Type) Type
Returns the type of elements in the array.
static
GetField(Object) FieldInfo
Returns the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field if there is one or tries to get it from the object's type.
GetField(Object) FieldInfo
Returns the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field if there is one, otherwise calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetField(System.Object@).
GetField(SerializedObject) FieldInfo
Calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetField(System.Object) with the UnityEditor.SerializedObject.targetObject.
GetField(SerializedProperty) FieldInfo
Calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetField(UnityEditor.SerializedObject) with the UnityEditor.SerializedProperty.serializedObject.
GetFieldElementType(Object) Type
Returns the InspectorGadgets.Editor.Serialization.PropertyAccessor.FieldElementType if there is one, otherwise calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetField(System.Object@) and returns its System.Reflection.FieldInfo.FieldType.
GetFieldElementType(SerializedObject) Type
Calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetFieldElementType(System.Object) with the UnityEditor.SerializedObject.targetObject.
GetFieldElementType(SerializedProperty) Type
Calls InspectorGadgets.Editor.Serialization.PropertyAccessor.GetFieldElementType(UnityEditor.SerializedObject) with the UnityEditor.SerializedProperty.serializedObject.
GetPath() string
Returns this accessor's UnityEditor.SerializedProperty.propertyPath.
GetValue(Object) Object
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to get and return the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
GetValue(SerializedObject) Object
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to get and return the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
GetValue(SerializedProperty) Object
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to get and return the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
ResetValue(SerializedProperty, string) void
Resets the value of the UnityEditor.SerializedProperty to the default value of its type by executing its constructor and field initializers.
SetCollection(Object, Object) void
Sets the collection object targeted by this accessor.
SetValue(Object, Object) void
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to set the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
SetValue(SerializedObject, Object) void
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to set the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
SetValue(SerializedProperty, Object) void
Gets the value of the from the InspectorGadgets.Editor.Serialization.PropertyAccessor.Parent (if there is one), then uses it to set the value of the InspectorGadgets.Editor.Serialization.PropertyAccessor.Field.
ToString() string
Returns a description of this accessor's path.