Skip to content

Commit f057b25

Browse files
committed
feat: support Unity 2019.4
1 parent 2caa3ca commit f057b25

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

Editor/Scripts/Window/PlayableGraphMonitorWindow.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ public static PlayableGraphMonitorWindow Open()
1919
}
2020

2121

22-
private readonly List<PlayableGraph> _graphs = new List<PlayableGraph>();
22+
private readonly List<PlayableGraph> _graphs = new List<PlayableGraph>
23+
{
24+
new PlayableGraph() // a invalid graph, for compatibility with Unity 2019
25+
};
2326

2427
private Toolbar _toolbar;
2528

@@ -187,13 +190,13 @@ private void OnDestroyingGraph(PlayableGraph graph)
187190
private void UpdatePlayableGraphPopupField()
188191
{
189192
var index = _graphs.IndexOf(_graphPopupField.value);
190-
if (index == -1 && _graphs.Count > 0)
193+
if (index < 1)
191194
{
192-
index = 0;
195+
index = _graphs.Count - 1;
193196
}
194197

195198
_graphPopupField.index = index;
196-
_graphPopupField.value = index > -1 ? _graphs[index] : new PlayableGraph();
199+
_graphPopupField.value = _graphs[index];
197200
_graphPopupField.MarkDirtyRepaint();
198201
}
199202

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "com.greenbamboogames.playablegraphmonitor",
33
"version": "0.0.1",
44
"displayName": "PlayableGraphMonitor!",
5-
"description": "Playable graph monitor.",
6-
"unity": "2021.3",
5+
"description": "PlayableGraph monitor.",
6+
"unity": "2019.4",
77
"documentationUrl": "https://github.com/SolarianZ/UnityPlayableGraphMonitorTool",
88
"changelogUrl": "",
99
"licensesUrl": "https://github.com/SolarianZ/UnityPlayableGraphMonitorTool/blob/main/LICENSE",

0 commit comments

Comments
 (0)