Serialization.

Serialization.PropertyReference Class

Summary

[Editor-Only] A serializable reference to a SerializedProperty.
graph BT Type-->Base0["Object"] Type["Serialization.PropertyReference"] class Type type-node

Syntax

[Serializable]
public class Serialization.PropertyReference

Attributes

Type Description
SerializableAttribute

Constructors

Name Summary
PropertyReference(SerializedProperty) Creates a new InspectorGadgets.Editor.Serialization.PropertyReference which wraps the specified `property`.

Properties

Name Value Summary
Context Serialization.ObjectReference
[SerializeField] The SerializedObject.context.
IsInitialized bool
Indicates whether the InspectorGadgets.Editor.Serialization.PropertyReference.Property has been accessed.
Property SerializedProperty
[SerializeField] The referenced SerializedProperty.
PropertyPath string
[SerializeField] The SerializedProperty.propertyPath.
TargetObject Serialization.ObjectReference
[SerializeField] The SerializedObject.targetObject.
TargetObjects Serialization.ObjectReference[]
[SerializeField] The SerializedObject.targetObjects.

Methods

Name Value Summary
ApplyModifiedProperties() void
Calls SerializedObject.ApplyModifiedProperties if the InspectorGadgets.Editor.Serialization.PropertyReference.Property has been initialized.
Dispose() void
Calls SerializedObject.Dispose if the InspectorGadgets.Editor.Serialization.PropertyReference.Property has been initialized.
DoPropertyGUI(Rect) void
Draws the target property within the specified `area`.
DoTargetGUI(Rect) void
Draws the target object within the specified `area`.
GetPropertyHeight() float
Gets the height needed to draw the target property.
IsTarget(SerializedProperty, Object[]) bool
Do the specified `property` and `targetObjects` match the targets of this reference?
Update() void
Calls SerializedObject.Update if the InspectorGadgets.Editor.Serialization.PropertyReference.Property has been initialized.

Operators

Name Value Summary
implicit operator Serialization.PropertyReference(SerializedProperty) Serialization.PropertyReference
implicit operator SerializedProperty(Serialization.PropertyReference) SerializedProperty

Extension Methods

Name Value Summary
IsValid() bool
Returns true if the `reference` and InspectorGadgets.Editor.Serialization.PropertyReference.Property are not null.