I begun making a script with a simple public List<GameObject> ObjectsToAnimate; where a designer can drop a number of objects.
Right beside that list, I then wish to display a drop-down menu populated by any animations I can find in those objects, selectable in the inspector by a designer.
I find it very difficult to find help on this topic, due to many results showing examples from the legacy animation system (as seen here, for example), and also, I oddly find a lot of conflicting results on how to create a drop-down list (do I override OnGUI or OnInspectorGUI for example). Is there anyone who can point me in the right direction here?
Here is an example of a recent solution, but I thought that AnimationClip is part of the legacy
I ended up using this asset to hard link a GameObject to an AnimationClip, which means that the designer need to pick a GameObject from the scene first, and then a .anim from the Project folders second, which isn’t super clean, but it will do for now.
The drop-down menu of available animations will have to wait for another day.