Varneon / VUdon-Menus

UdonSharp library for creating abstract VRChat world menus
MIT License
3 stars 0 forks source link

Add a visual menu hierarchy editor #3

Open Varneon opened 9 months ago

Varneon commented 9 months ago

Perhaps just like with the VUdon Music Player, Footsteps and Vehicles, the menu hierarchies could be created with ScriptableObjects and assigned to the prefabs in the editor.

Different menu hierarchies could be stacked together and prefabs could ship with their own menu options already declared.

Or maybe component-based approach might be the best since assigning callback receiver references requires for the data to exist in the scene.

Varneon commented 9 months ago

I have completed the GUI of the first proof of concept for a hierarchy descriptor component

image

Unity 2022's UI Toolkit includes new better tools for creating a proper inspector for such component, so for now I will keep it minimalistic dev interface while Unity 2019 is still in use.

Varneon commented 2 months ago

After putting this into heavy use for months I have found that having to manage paths manually is tedious and relocating dozens of menu items at once is extremely difficult and prone to errors.

There also isn't exactly any native solution for creating large menu event callback receivers that are capable of handling dozens if not hundreds of menu items.

I would like to entertain the idea of providing an attribute for marking a method in an UdonSharp script as the callback handler, allowing the visual menu descriptor to scan the callback receiver script and provide an easy way bind the menu item to a method instead of having to manually ensure that the menu item paths match on both the descriptor and the callback receiver.

Menu item mirroring is still something I don't quite have a silver bullet for yet, but as the development continues I'm sure some potential solution will come up.

Note to past self: Do not even bother with UI Toolkit, IMGUI is just fine for this.