Serialization.

Serialization.PropertyReference Class

Summary

[Editor-Only] A serializable reference to a UnityEditor.SerializedProperty.
Assembly
Animancer.dll
Namespace
Animancer.Editor
Base Types
  • Object
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 Animancer.Editor.Serialization.PropertyReference which wraps the specified `property`.

Properties

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

Methods

Name Value Summary
ApplyModifiedProperties() void
Calls UnityEditor.SerializedObject.ApplyModifiedProperties if the Animancer.Editor.Serialization.PropertyReference.Property has been initialized.
Dispose() void
Calls UnityEditor.SerializedObject.Dispose if the Animancer.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 UnityEditor.SerializedObject.Update if the Animancer.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 Animancer.Editor.Serialization.PropertyReference.Property are not null.