TimelineDisabledMode.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using UnityEngine;
  2. namespace UnityEditor.Timeline
  3. {
  4. class TimelineDisabledMode : TimelineMode
  5. {
  6. public TimelineDisabledMode()
  7. {
  8. headerState = new HeaderState
  9. {
  10. breadCrumb = TimelineModeGUIState.Enabled,
  11. options = TimelineModeGUIState.Enabled,
  12. sequenceSelector = TimelineModeGUIState.Enabled
  13. };
  14. trackOptionsState = new TrackOptionsState
  15. {
  16. newButton = TimelineModeGUIState.Enabled,
  17. editAsAssetButton = TimelineModeGUIState.Enabled
  18. };
  19. mode = TimelineModes.Disabled;
  20. }
  21. public override bool ShouldShowPlayRange(WindowState state)
  22. {
  23. return false;
  24. }
  25. public override bool ShouldShowTimeCursor(WindowState state)
  26. {
  27. return true;
  28. }
  29. public override TimelineModeGUIState ToolbarState(WindowState state)
  30. {
  31. return TimelineModeGUIState.Disabled;
  32. }
  33. public override TimelineModeGUIState TrackState(WindowState state)
  34. {
  35. return TimelineModeGUIState.Enabled;
  36. }
  37. }
  38. }