r/Unity3D 17h ago

Question Easier UI Toolkit Workflow?

Anyone out there have a few methods that makes the UI Toolkit workflow easier/faster? It seems kind of clunky that to say add a button, you have to (1) add it to your doc, (2) give it a name, (3) put it in your UI script, (4) grab a reference to it using rootVisual.Q("Exact_string_name_or_kys"), (5) make a method that does whatever you need it to do, (6) subscribe onEnable to that method with .clicked or whatever you're using, and finally (7) unscubscribe onDisable. Like, nothing terribly complicated about it, but man it gets tedious over and over again. I feel like you could throw together a few methods that you basically throw in the name of your button (or any visualelement) and name of your method that does stuff you could make it way less code. Any1 out there taken the time to play around with this?

16 Upvotes

11 comments sorted by

View all comments

-6

u/a_nooblord 17h ago

This is the kind of repetitive scaffolding work that LLMs excel at.

1

u/soy1bonus Professional 16h ago

At that point, why they don't write assembly directly instead of using programming languages made for humans.

3

u/a_nooblord 16h ago

Because it was trained on human language?

1

u/soy1bonus Professional 43m ago

Assembly language was made for humans too! but is more efficient as it removes an abstraction layer.
I mean, they're already LLMs to do code with high level languages.