So I’m liking UI Toolkit so far, but I did want to point out a couple things that are very fragile about some of the approaches in my book.
StyleSheet styleAsset = AssetDatabase.LoadAssetAtPath<StyleSheet>(path + "TaskListEditor.uss");
savedTasksObjectField = container.Q<ObjectField>("savedTasksObjectField");
Essentially hard coded strings. Very fragile; any changes to the path or those names breaks stuff. I found a solution to the path that I haven’t had issues with so far and can live with I think, so here’s that- the default settings for scripts in Unity.
[SerializeField] private VisualTreeAsset uxmlAsset = default;
[SerializeField] private StyleSheet styleAsset = default;
Global variables for the whole editor window script.
I haven’t found a good solution to the string queries for uxml items, any ideas?