Nexus/Library/PackageCache/com.unity.inputsystem@02433b2481ab/InputSystem/Editor/UITKAssetEditor/ReactiveProperty.cs

29 lines
507 B
C#
Raw Permalink Normal View History

2026-01-06 17:23:00 +01:00
#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