Assignment for RMIT Mixed Reality in 2020
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.

36 lines
548 B

  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using UnityEngine;
  4. using System;
  5. namespace AmplifyShaderEditor
  6. {
  7. //GENERICS DON'T WORK WITH HOT CODE RELOAD
  8. [Serializable]
  9. public class FallbackVariable<T>
  10. {
  11. [SerializeField]
  12. private T m_current;
  13. [SerializeField]
  14. private T m_last;
  15. public void Revert()
  16. {
  17. m_current = m_last;
  18. }
  19. public T Current
  20. {
  21. get
  22. {
  23. return m_current;
  24. }
  25. set
  26. {
  27. m_last = m_current;
  28. m_current = value;
  29. }
  30. }
  31. }
  32. }