You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Plugins/NaughtyAttributes/Scripts/Test/OnValueChangedTest.cs

52 lines
925 B
C#

3 months ago
using UnityEngine;
namespace NaughtyAttributes.Test
{
public class OnValueChangedTest : MonoBehaviour
{
[OnValueChanged("OnValueChangedMethod1")]
[OnValueChanged("OnValueChangedMethod2")]
public int int0;
private void OnValueChangedMethod1()
{
Debug.LogFormat("int0: {0}", int0);
}
private void OnValueChangedMethod2()
{
Debug.LogFormat("int0: {0}", int0);
}
public OnValueChangedNest1 nest1;
}
[System.Serializable]
public class OnValueChangedNest1
{
[OnValueChanged("OnValueChangedMethod")]
[AllowNesting]
public int int1;
private void OnValueChangedMethod()
{
Debug.LogFormat("int1: {0}", int1);
}
public OnValueChangedNest2 nest2;
}
[System.Serializable]
public class OnValueChangedNest2
{
[OnValueChanged("OnValueChangedMethod")]
[AllowNesting]
public int int2;
private void OnValueChangedMethod()
{
Debug.LogFormat("int2: {0}", int2);
}
}
}