Alchemy/docs/articles/en/attributes/on-value-changed.md
2024-02-20 14:49:47 +09:00

345 B

On Value Changed Attribute

Executes a method with the specified name when the value of the field changes.

[OnValueChanged("OnValueChanged")]
public int foo;

void OnValueChanged(int value)
{
    Debug.Log(value);
}
Parameter Description
MethodName The name of the method to be called when the value changes.