DefaultValues.

SetToDefault<T>(T, SerializedProperty) Method

Summary

[Editor-Only] If the field represented by the `property` has a Animancer.DefaultValueAttribute, this method sets the `value` to its Animancer.DefaultValueAttribute.Primary value. If it was already at the value, it sets it to the Animancer.DefaultValueAttribute.Secondary value instead. And if the field has no attribute, it uses the default for the type.
Assembly
Animancer.dll
Namespace
Animancer.Editor
Containing Type
DefaultValues

Syntax

public static void SetToDefault<T>(ref T value, SerializedProperty property)

Type Parameters

Name Description
T

Parameters

Name Type Description
value T
property SerializedProperty

Return Value

Type Description
void