Skip to main content

Class SerializePropertyExtensions

Namespace: Aspid.FastTools.Editors
Assembly: Aspid.FastTools.Editor.dll

Provides extension methods for synchronizing and assigning SerializedProperty values.

public static class SerializePropertyExtensions

Inheritance​

object ← SerializePropertyExtensions

Methods​

AddArraySize<T>(T, int)​

Increases arraySize by value and returns the property for chaining.

public static T AddArraySize<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to add to the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

AddArraySizeAndApply<T>(T, int)​

Increases arraySize by value then applies modified properties.

public static T AddArraySizeAndApply<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to add to the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

AddArraySizeAndApplyWithoutUndo<T>(T, int)​

Increases arraySize by value then applies modified properties without recording Undo.

public static T AddArraySizeAndApplyWithoutUndo<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to add to the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

ApplyModifiedProperties<T>(T)​

Calls ApplyModifiedProperties on the property's serialized object and returns the property for chaining.

public static T ApplyModifiedProperties<T>(this T property) where T : SerializedProperty

Parameters​

property T

The property whose serialized object changes should be applied.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

ApplyModifiedPropertiesWithoutUndo<T>(T)​

Calls ApplyModifiedPropertiesWithoutUndo on the property's serialized object and returns the property for chaining.

public static T ApplyModifiedPropertiesWithoutUndo<T>(this T property) where T : SerializedProperty

Parameters​

property T

The property whose serialized object changes should be applied without registering an undo step.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

GetDeclaringInstance(SerializedProperty)​

Returns the instance declaring the backing field, including the collection owner for array or list elements.

public static object GetDeclaringInstance(this SerializedProperty property)

Parameters​

property SerializedProperty

The property whose declaring instance to resolve.

Returns​

object

The declaring instance; otherwise, null if the path cannot be resolved.

Remarks​

A struct instance is a boxed copy; modifying it does not update the serialized object.

GetFieldInfo(SerializedProperty)​

Resolves the backing field on the runtime type of the declaring instance or its base classes.

public static FieldInfo GetFieldInfo(this SerializedProperty property)

Parameters​

property SerializedProperty

The property whose backing field to locate.

Returns​

FieldInfo

The backing field; otherwise, null if it cannot be resolved.

Remarks​

For an array or list element, returns the collection field.

GetMemberName(SerializedProperty)​

Returns the backing field name, including the collection field for an array or list element.

public static string GetMemberName(this SerializedProperty property)

Parameters​

property SerializedProperty

The property to inspect.

Returns​

string

The backing field name without collection indices.

GetPropertyType(SerializedProperty)​

Returns the backing field type or, for an array or list element, its element type.

public static Type GetPropertyType(this SerializedProperty serializedProperty)

Parameters​

serializedProperty SerializedProperty

The property to inspect.

Returns​

Type

The declared type; otherwise, null if the backing field cannot be resolved.

HasFoldout(SerializedProperty)​

Determines whether a generic serialized value has visible children.

public static bool HasFoldout(this SerializedProperty property)

Parameters​

property SerializedProperty

The property to inspect.

Returns​

bool

true for a generic value with visible children; otherwise, false.

Remarks​

Managed references and custom drawer layouts are not covered by this check.

IsArrayElement(SerializedProperty)​

Determines whether property represents an array or list element.

public static bool IsArrayElement(this SerializedProperty property)

Parameters​

property SerializedProperty

The property to inspect.

Returns​

bool

true if the path ends with an element index; otherwise, false.

Persistent(SerializedProperty)​

Returns the property at the same path on an independent SerializedObject.

public static SerializedProperty Persistent(this SerializedProperty property)

Parameters​

property SerializedProperty

The source property.

Returns​

SerializedProperty

The independent property; otherwise, null if the path no longer exists on the targets.

Remarks​

The caller owns the serialized object of a non-null result and must dispose it when finished. Pending changes on the source are not copied until they have been applied to its targets.

RemoveArraySize<T>(T, int)​

Decreases arraySize by value and returns the property for chaining.

public static T RemoveArraySize<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to subtract from the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

RemoveArraySizeAndApply<T>(T, int)​

Decreases arraySize by value then applies modified properties.

public static T RemoveArraySizeAndApply<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to subtract from the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

RemoveArraySizeAndApplyWithoutUndo<T>(T, int)​

Decreases arraySize by value then applies modified properties without recording Undo.

public static T RemoveArraySizeAndApplyWithoutUndo<T>(this T property, int value = 1) where T : SerializedProperty

Parameters​

property T

Target array property.

value int

Amount to subtract from the current array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetAnimationCurve<T>(T, AnimationCurve)​

Sets animationCurveValue and returns the property for chaining.

public static T SetAnimationCurve<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetAnimationCurveAndApply<T>(T, AnimationCurve)​

Sets animationCurveValue then applies modified properties.

public static T SetAnimationCurveAndApply<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetAnimationCurveAndApplyWithoutUndo<T>(T, AnimationCurve)​

Sets animationCurveValue then applies modified properties without recording Undo.

public static T SetAnimationCurveAndApplyWithoutUndo<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetArraySize<T>(T, int)​

Sets arraySize and returns the property for chaining.

public static T SetArraySize<T>(this T property, int size) where T : SerializedProperty

Parameters​

property T

Target array property.

size int

New array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetArraySizeAndApply<T>(T, int)​

Sets arraySize then applies modified properties.

public static T SetArraySizeAndApply<T>(this T property, int size) where T : SerializedProperty

Parameters​

property T

Target array property.

size int

New array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetArraySizeAndApplyWithoutUndo<T>(T, int)​

Sets arraySize then applies modified properties without recording Undo.

public static T SetArraySizeAndApplyWithoutUndo<T>(this T property, int size) where T : SerializedProperty

Parameters​

property T

Target array property.

size int

New array size.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBool<T>(T, bool)​

Sets boolValue and returns the property for chaining.

public static T SetBool<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoolAndApply<T>(T, bool)​

Sets boolValue then applies modified properties.

public static T SetBoolAndApply<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoolAndApplyWithoutUndo<T>(T, bool)​

Sets boolValue then applies modified properties without recording Undo.

public static T SetBoolAndApplyWithoutUndo<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBounds<T>(T, Bounds)​

Sets boundsValue and returns the property for chaining.

public static T SetBounds<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoundsAndApply<T>(T, Bounds)​

Sets boundsValue then applies modified properties.

public static T SetBoundsAndApply<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoundsAndApplyWithoutUndo<T>(T, Bounds)​

Sets boundsValue then applies modified properties without recording Undo.

public static T SetBoundsAndApplyWithoutUndo<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoundsInt<T>(T, BoundsInt)​

Sets boundsIntValue and returns the property for chaining.

public static T SetBoundsInt<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoundsIntAndApply<T>(T, BoundsInt)​

Sets boundsIntValue then applies modified properties.

public static T SetBoundsIntAndApply<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoundsIntAndApplyWithoutUndo<T>(T, BoundsInt)​

Sets boundsIntValue then applies modified properties without recording Undo.

public static T SetBoundsIntAndApplyWithoutUndo<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoxed<T>(T, object)​

Sets boxedValue and returns the property for chaining.

public static T SetBoxed<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property.

value object

Boxed value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoxedAndApply<T>(T, object)​

Sets boxedValue then applies modified properties.

public static T SetBoxedAndApply<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property.

value object

Boxed value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetBoxedAndApplyWithoutUndo<T>(T, object)​

Sets boxedValue then applies modified properties without recording Undo.

public static T SetBoxedAndApplyWithoutUndo<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property.

value object

Boxed value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetColor<T>(T, Color)​

Sets colorValue and returns the property for chaining.

public static T SetColor<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetColorAndApply<T>(T, Color)​

Sets colorValue then applies modified properties.

public static T SetColorAndApply<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetColorAndApplyWithoutUndo<T>(T, Color)​

Sets colorValue then applies modified properties without recording Undo.

public static T SetColorAndApplyWithoutUndo<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetDouble<T>(T, double)​

Sets doubleValue and returns the property for chaining.

public static T SetDouble<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetDoubleAndApply<T>(T, double)​

Sets doubleValue then applies modified properties.

public static T SetDoubleAndApply<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetDoubleAndApplyWithoutUndo<T>(T, double)​

Sets doubleValue then applies modified properties without recording Undo.

public static T SetDoubleAndApplyWithoutUndo<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEntityId<T>(T, EntityId)​

Sets entityIdValue and returns the property for chaining.

public static T SetEntityId<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEntityIdAndApply<T>(T, EntityId)​

Sets entityIdValue then applies modified properties.

public static T SetEntityIdAndApply<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEntityIdAndApplyWithoutUndo<T>(T, EntityId)​

Sets entityIdValue then applies modified properties without recording Undo.

public static T SetEntityIdAndApplyWithoutUndo<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEnumFlag<T>(T, int)​

Sets enumValueFlag and returns the property for chaining.

public static T SetEnumFlag<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Flag value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

Remarks​

There is no SetValue<T>(int) alias for enum flags because it would conflict with SerializePropertyExtensions.SetInt<T>. Call SerializePropertyExtensions.SetEnumFlag<T> explicitly.

SetEnumFlagAndApply<T>(T, int)​

Sets enumValueFlag then applies modified properties.

public static T SetEnumFlagAndApply<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Flag value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEnumFlagAndApplyWithoutUndo<T>(T, int)​

Sets enumValueFlag then applies modified properties without recording Undo.

public static T SetEnumFlagAndApplyWithoutUndo<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Flag value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEnumIndex<T>(T, int)​

Sets enumValueIndex and returns the property for chaining.

public static T SetEnumIndex<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Index value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

Remarks​

There is no SetValue<T>(int) alias for enum index because it would conflict with SerializePropertyExtensions.SetInt<T>. Call SerializePropertyExtensions.SetEnumIndex<T> explicitly.

SetEnumIndexAndApply<T>(T, int)​

Sets enumValueIndex then applies modified properties.

public static T SetEnumIndexAndApply<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Index value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetEnumIndexAndApplyWithoutUndo<T>(T, int)​

Sets enumValueIndex then applies modified properties without recording Undo.

public static T SetEnumIndexAndApplyWithoutUndo<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Index value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetExposedReference<T>(T, Object)​

Sets exposedReferenceValue and returns the property for chaining.

public static T SetExposedReference<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object exposed reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetExposedReferenceAndApply<T>(T, Object)​

Sets exposedReferenceValue then applies modified properties.

public static T SetExposedReferenceAndApply<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object exposed reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetExposedReferenceAndApplyWithoutUndo<T>(T, Object)​

Sets exposedReferenceValue then applies modified properties without recording Undo.

public static T SetExposedReferenceAndApplyWithoutUndo<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object exposed reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetFloat<T>(T, float)​

Sets floatValue and returns the property for chaining.

public static T SetFloat<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetFloatAndApply<T>(T, float)​

Sets floatValue then applies modified properties.

public static T SetFloatAndApply<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetFloatAndApplyWithoutUndo<T>(T, float)​

Sets floatValue then applies modified properties without recording Undo.

public static T SetFloatAndApplyWithoutUndo<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetGradient<T>(T, Gradient)​

Sets gradientValue and returns the property for chaining.

public static T SetGradient<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetGradientAndApply<T>(T, Gradient)​

Sets gradientValue then applies modified properties.

public static T SetGradientAndApply<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetGradientAndApplyWithoutUndo<T>(T, Gradient)​

Sets gradientValue then applies modified properties without recording Undo.

public static T SetGradientAndApplyWithoutUndo<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetHash128<T>(T, Hash128)​

Sets hash128Value and returns the property for chaining.

public static T SetHash128<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetHash128AndApply<T>(T, Hash128)​

Sets hash128Value then applies modified properties.

public static T SetHash128AndApply<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetHash128AndApplyWithoutUndo<T>(T, Hash128)​

Sets hash128Value then applies modified properties without recording Undo.

public static T SetHash128AndApplyWithoutUndo<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetInt<T>(T, int)​

Sets intValue and returns the property for chaining.

public static T SetInt<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetIntAndApply<T>(T, int)​

Sets intValue then applies modified properties.

public static T SetIntAndApply<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetIntAndApplyWithoutUndo<T>(T, int)​

Sets intValue then applies modified properties without recording Undo.

public static T SetIntAndApplyWithoutUndo<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetLong<T>(T, long)​

Sets longValue and returns the property for chaining.

public static T SetLong<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetLongAndApply<T>(T, long)​

Sets longValue then applies modified properties.

public static T SetLongAndApply<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetLongAndApplyWithoutUndo<T>(T, long)​

Sets longValue then applies modified properties without recording Undo.

public static T SetLongAndApplyWithoutUndo<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetManagedReference<T>(T, object)​

Sets managedReferenceValue and returns the property for chaining.

public static T SetManagedReference<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property (must be a [SerializeReference] field).

value object

Managed reference value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetManagedReferenceAndApply<T>(T, object)​

Sets managedReferenceValue then applies modified properties.

public static T SetManagedReferenceAndApply<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property (must be a [SerializeReference] field).

value object

Managed reference value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetManagedReferenceAndApplyWithoutUndo<T>(T, object)​

Sets managedReferenceValue then applies modified properties without recording Undo.

public static T SetManagedReferenceAndApplyWithoutUndo<T>(this T property, object value) where T : SerializedProperty

Parameters​

property T

Target property (must be a [SerializeReference] field).

value object

Managed reference value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetObjectReference<T>(T, Object)​

Sets objectReferenceValue and returns the property for chaining.

public static T SetObjectReference<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetObjectReferenceAndApply<T>(T, Object)​

Sets objectReferenceValue then applies modified properties.

public static T SetObjectReferenceAndApply<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetObjectReferenceAndApplyWithoutUndo<T>(T, Object)​

Sets objectReferenceValue then applies modified properties without recording Undo.

public static T SetObjectReferenceAndApplyWithoutUndo<T>(this T property, Object value) where T : SerializedProperty

Parameters​

property T

Target property.

value Object

Object reference to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetQuaternion<T>(T, Quaternion)​

Sets quaternionValue and returns the property for chaining.

public static T SetQuaternion<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetQuaternionAndApply<T>(T, Quaternion)​

Sets quaternionValue then applies modified properties.

public static T SetQuaternionAndApply<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetQuaternionAndApplyWithoutUndo<T>(T, Quaternion)​

Sets quaternionValue then applies modified properties without recording Undo.

public static T SetQuaternionAndApplyWithoutUndo<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRect<T>(T, Rect)​

Sets rectValue and returns the property for chaining.

public static T SetRect<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRectAndApply<T>(T, Rect)​

Sets rectValue then applies modified properties.

public static T SetRectAndApply<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRectAndApplyWithoutUndo<T>(T, Rect)​

Sets rectValue then applies modified properties without recording Undo.

public static T SetRectAndApplyWithoutUndo<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRectInt<T>(T, RectInt)​

Sets rectIntValue and returns the property for chaining.

public static T SetRectInt<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRectIntAndApply<T>(T, RectInt)​

Sets rectIntValue then applies modified properties.

public static T SetRectIntAndApply<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetRectIntAndApplyWithoutUndo<T>(T, RectInt)​

Sets rectIntValue then applies modified properties without recording Undo.

public static T SetRectIntAndApplyWithoutUndo<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetString<T>(T, string)​

Sets stringValue and returns the property for chaining.

public static T SetString<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetStringAndApply<T>(T, string)​

Sets stringValue then applies modified properties.

public static T SetStringAndApply<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetStringAndApplyWithoutUndo<T>(T, string)​

Sets stringValue then applies modified properties without recording Undo.

public static T SetStringAndApplyWithoutUndo<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUint<T>(T, uint)​

Sets uintValue and returns the property for chaining.

public static T SetUint<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUintAndApply<T>(T, uint)​

Sets uintValue then applies modified properties.

public static T SetUintAndApply<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUintAndApplyWithoutUndo<T>(T, uint)​

Sets uintValue then applies modified properties without recording Undo.

public static T SetUintAndApplyWithoutUndo<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUlong<T>(T, ulong)​

Sets ulongValue and returns the property for chaining.

public static T SetUlong<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUlongAndApply<T>(T, ulong)​

Sets ulongValue then applies modified properties.

public static T SetUlongAndApply<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetUlongAndApplyWithoutUndo<T>(T, ulong)​

Sets ulongValue then applies modified properties without recording Undo.

public static T SetUlongAndApplyWithoutUndo<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, int)​

Sets intValue and returns the property for chaining.

public static T SetValue<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, uint)​

Sets uintValue and returns the property for chaining.

public static T SetValue<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, long)​

Sets longValue and returns the property for chaining.

public static T SetValue<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, ulong)​

Sets ulongValue and returns the property for chaining.

public static T SetValue<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, float)​

Sets floatValue and returns the property for chaining.

public static T SetValue<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, double)​

Sets doubleValue and returns the property for chaining.

public static T SetValue<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, bool)​

Sets boolValue and returns the property for chaining.

public static T SetValue<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Rect)​

Sets rectValue and returns the property for chaining.

public static T SetValue<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, RectInt)​

Sets rectIntValue and returns the property for chaining.

public static T SetValue<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Bounds)​

Sets boundsValue and returns the property for chaining.

public static T SetValue<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, BoundsInt)​

Sets boundsIntValue and returns the property for chaining.

public static T SetValue<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Color)​

Sets colorValue and returns the property for chaining.

public static T SetValue<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Gradient)​

Sets gradientValue and returns the property for chaining.

public static T SetValue<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Hash128)​

Sets hash128Value and returns the property for chaining.

public static T SetValue<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Vector4)​

Sets vector4Value and returns the property for chaining.

public static T SetValue<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Vector3)​

Sets vector3Value and returns the property for chaining.

public static T SetValue<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Vector3Int)​

Sets vector3IntValue and returns the property for chaining.

public static T SetValue<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Vector2)​

Sets vector2Value and returns the property for chaining.

public static T SetValue<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Vector2Int)​

Sets vector2IntValue and returns the property for chaining.

public static T SetValue<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, Quaternion)​

Sets quaternionValue and returns the property for chaining.

public static T SetValue<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, string)​

Sets stringValue and returns the property for chaining.

public static T SetValue<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, AnimationCurve)​

Sets animationCurveValue and returns the property for chaining.

public static T SetValue<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValue<T>(T, EntityId)​

Sets entityIdValue and returns the property for chaining.

public static T SetValue<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, int)​

Sets intValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, uint)​

Sets uintValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, long)​

Sets longValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, ulong)​

Sets ulongValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, float)​

Sets floatValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, double)​

Sets doubleValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, bool)​

Sets boolValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Rect)​

Sets rectValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, RectInt)​

Sets rectIntValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Bounds)​

Sets boundsValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, BoundsInt)​

Sets boundsIntValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Color)​

Sets colorValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Gradient)​

Sets gradientValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Hash128)​

Sets hash128Value then applies modified properties.

public static T SetValueAndApply<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Vector4)​

Sets vector4Value then applies modified properties.

public static T SetValueAndApply<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Vector3)​

Sets vector3Value then applies modified properties.

public static T SetValueAndApply<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Vector3Int)​

Sets vector3IntValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Vector2)​

Sets vector2Value then applies modified properties.

public static T SetValueAndApply<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Vector2Int)​

Sets vector2IntValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, Quaternion)​

Sets quaternionValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, string)​

Sets stringValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, AnimationCurve)​

Sets animationCurveValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApply<T>(T, EntityId)​

Sets entityIdValue then applies modified properties.

public static T SetValueAndApply<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, int)​

Sets intValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, int value) where T : SerializedProperty

Parameters​

property T

Target property.

value int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, uint)​

Sets uintValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, uint value) where T : SerializedProperty

Parameters​

property T

Target property.

value uint

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, long)​

Sets longValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, long value) where T : SerializedProperty

Parameters​

property T

Target property.

value long

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, ulong)​

Sets ulongValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, ulong value) where T : SerializedProperty

Parameters​

property T

Target property.

value ulong

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, float)​

Sets floatValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, float value) where T : SerializedProperty

Parameters​

property T

Target property.

value float

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, double)​

Sets doubleValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, double value) where T : SerializedProperty

Parameters​

property T

Target property.

value double

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, bool)​

Sets boolValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, bool value) where T : SerializedProperty

Parameters​

property T

Target property.

value bool

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Rect)​

Sets rectValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Rect value) where T : SerializedProperty

Parameters​

property T

Target property.

value Rect

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, RectInt)​

Sets rectIntValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, RectInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value RectInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Bounds)​

Sets boundsValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Bounds value) where T : SerializedProperty

Parameters​

property T

Target property.

value Bounds

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, BoundsInt)​

Sets boundsIntValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, BoundsInt value) where T : SerializedProperty

Parameters​

property T

Target property.

value BoundsInt

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Color)​

Sets colorValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Color value) where T : SerializedProperty

Parameters​

property T

Target property.

value Color

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Gradient)​

Sets gradientValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Gradient value) where T : SerializedProperty

Parameters​

property T

Target property.

value Gradient

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Hash128)​

Sets hash128Value then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Hash128 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Hash128

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Vector4)​

Sets vector4Value then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Vector3)​

Sets vector3Value then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Vector3Int)​

Sets vector3IntValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Vector2)​

Sets vector2Value then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Vector2Int)​

Sets vector2IntValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, Quaternion)​

Sets quaternionValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, Quaternion value) where T : SerializedProperty

Parameters​

property T

Target property.

value Quaternion

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, string)​

Sets stringValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, string value) where T : SerializedProperty

Parameters​

property T

Target property.

value string

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, AnimationCurve)​

Sets animationCurveValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, AnimationCurve value) where T : SerializedProperty

Parameters​

property T

Target property.

value AnimationCurve

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetValueAndApplyWithoutUndo<T>(T, EntityId)​

Sets entityIdValue then applies modified properties without recording Undo.

public static T SetValueAndApplyWithoutUndo<T>(this T property, EntityId value) where T : SerializedProperty

Parameters​

property T

Target property.

value EntityId

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2<T>(T, Vector2)​

Sets vector2Value and returns the property for chaining.

public static T SetVector2<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2AndApply<T>(T, Vector2)​

Sets vector2Value then applies modified properties.

public static T SetVector2AndApply<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2AndApplyWithoutUndo<T>(T, Vector2)​

Sets vector2Value then applies modified properties without recording Undo.

public static T SetVector2AndApplyWithoutUndo<T>(this T property, Vector2 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2Int<T>(T, Vector2Int)​

Sets vector2IntValue and returns the property for chaining.

public static T SetVector2Int<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2IntAndApply<T>(T, Vector2Int)​

Sets vector2IntValue then applies modified properties.

public static T SetVector2IntAndApply<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector2IntAndApplyWithoutUndo<T>(T, Vector2Int)​

Sets vector2IntValue then applies modified properties without recording Undo.

public static T SetVector2IntAndApplyWithoutUndo<T>(this T property, Vector2Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector2Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3<T>(T, Vector3)​

Sets vector3Value and returns the property for chaining.

public static T SetVector3<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3AndApply<T>(T, Vector3)​

Sets vector3Value then applies modified properties.

public static T SetVector3AndApply<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3AndApplyWithoutUndo<T>(T, Vector3)​

Sets vector3Value then applies modified properties without recording Undo.

public static T SetVector3AndApplyWithoutUndo<T>(this T property, Vector3 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3Int<T>(T, Vector3Int)​

Sets vector3IntValue and returns the property for chaining.

public static T SetVector3Int<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3IntAndApply<T>(T, Vector3Int)​

Sets vector3IntValue then applies modified properties.

public static T SetVector3IntAndApply<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector3IntAndApplyWithoutUndo<T>(T, Vector3Int)​

Sets vector3IntValue then applies modified properties without recording Undo.

public static T SetVector3IntAndApplyWithoutUndo<T>(this T property, Vector3Int value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector3Int

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector4<T>(T, Vector4)​

Sets vector4Value and returns the property for chaining.

public static T SetVector4<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector4AndApply<T>(T, Vector4)​

Sets vector4Value then applies modified properties.

public static T SetVector4AndApply<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

SetVector4AndApplyWithoutUndo<T>(T, Vector4)​

Sets vector4Value then applies modified properties without recording Undo.

public static T SetVector4AndApplyWithoutUndo<T>(this T property, Vector4 value) where T : SerializedProperty

Parameters​

property T

Target property.

value Vector4

Value to assign.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

Update<T>(T)​

Calls Update on the property's serialized object and returns the property for chaining.

public static T Update<T>(this T property) where T : SerializedProperty

Parameters​

property T

The property whose serialized object should be updated.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

UpdateIfRequiredOrScript<T>(T)​

Calls UpdateIfRequiredOrScript on the property's serialized object and returns the property for chaining.

public static T UpdateIfRequiredOrScript<T>(this T property) where T : SerializedProperty

Parameters​

property T

The property whose serialized object should be conditionally updated.

Returns​

T

The same property instance.

Type Parameters​

T

Concrete SerializedProperty type.

On this page