Bez popisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReactiveProperty.cs 507B

12345678910111213141516171819202122232425262728
  1. #if UNITY_EDITOR
  2. using System;
  3. namespace UnityEngine.InputSystem.Editor
  4. {
  5. internal class ReactiveProperty<T>
  6. {
  7. private T m_Value;
  8. public event Action<T> Changed;
  9. public T value
  10. {
  11. get => m_Value;
  12. set
  13. {
  14. m_Value = value;
  15. Changed?.Invoke(m_Value);
  16. }
  17. }
  18. public void SetValueWithoutChangeNotification(T value)
  19. {
  20. m_Value = value;
  21. }
  22. }
  23. }
  24. #endif