IndieGame/client/Packages/com.unity.inputsystem@1.7.0/InputSystem/Editor/UITKAssetEditor/ReactiveProperty.cs
DOBEST\zhaoyingjie f242607587 初始化工程
2024-10-11 10:12:15 +08:00

29 lines
507 B
C#

#if UNITY_EDITOR
using System;
namespace UnityEngine.InputSystem.Editor
{
internal class ReactiveProperty<T>
{
private T m_Value;
public event Action<T> Changed;
public T value
{
get => m_Value;
set
{
m_Value = value;
Changed?.Invoke(m_Value);
}
}
public void SetValueWithoutChangeNotification(T value)
{
m_Value = value;
}
}
}
#endif