|
1 | | -using System; |
2 | | -using System.Collections.Generic; |
3 | 1 | using GBG.PlayableGraphMonitor.Editor.GraphView; |
4 | 2 | using GBG.PlayableGraphMonitor.Editor.Utility; |
| 3 | +using System.Collections.Generic; |
5 | 4 | using UnityEditor; |
6 | 5 | using UnityEngine; |
7 | 6 | using UnityEngine.Playables; |
@@ -127,12 +126,13 @@ private void OnDisable() |
127 | 126 |
|
128 | 127 | private void Update() |
129 | 128 | { |
130 | | - UpdateGraphView(); |
| 129 | + // TODO FIXME CLIP_PROGRESS: If I reverse the order of these two method calls, the progress bar on the Clip node will become inaccurate. Why??? |
131 | 130 | DrawInspector(); |
| 131 | + UpdateGraphView(); |
132 | 132 |
|
133 | 133 | if (_updateNodesMovability) |
134 | 134 | { |
135 | | - _graphView.SetNodesMovability(_refreshRate == RefreshRate.Manual); |
| 135 | + _graphView.SetNodesMovability(!_autoLayoutToggle.value); |
136 | 136 | } |
137 | 137 | } |
138 | 138 |
|
@@ -220,10 +220,20 @@ private void OnDestroyingGraph(PlayableGraph graph) |
220 | 220 |
|
221 | 221 | void IHasCustomMenu.AddItemsToMenu(GenericMenu menu) |
222 | 222 | { |
223 | | - menu.AddItem(new GUIContent("Keep updating edges when mouse leave GraphView(will degrade performance)"), |
| 223 | +#if UNITY_2021_1_OR_NEWER |
| 224 | + menu.AddItem(new GUIContent("Show clip progress bar title (will degrade performance)"), |
| 225 | + _viewUpdateContext.ShowClipProgressBarTitle, OnToggleShowClipProgressBarTitle); |
| 226 | +#endif |
| 227 | + |
| 228 | + menu.AddItem(new GUIContent("Keep updating edges when mouse leave GraphView (will degrade performance)"), |
224 | 229 | _viewUpdateContext.KeepUpdatingEdges, OnToggleKeepUpdatingEdges); |
225 | 230 | } |
226 | 231 |
|
| 232 | + private void OnToggleShowClipProgressBarTitle() |
| 233 | + { |
| 234 | + _viewUpdateContext.ShowClipProgressBarTitle = !_viewUpdateContext.ShowClipProgressBarTitle; |
| 235 | + } |
| 236 | + |
227 | 237 | private void OnToggleKeepUpdatingEdges() |
228 | 238 | { |
229 | 239 | _viewUpdateContext.KeepUpdatingEdges = !_viewUpdateContext.KeepUpdatingEdges; |
|
0 commit comments