I am working on a project in which I have to supply informations for various agents in game. I want, just by passing the mouse over the location of the agent, to get a menu with the multiple fields I have to fill. The thing is, these fields are a the very last end of a hierarchy.
I would do it like this:
A scroll view in the “most root” hierachy. The content should have a (Vertical) Layout Group. Inside there you can have your other “roots” (let’s call them “nodes”).
A node is a Toggle (it should expand / collapse the fields on click, right?). The child of the Toggle is one other Game Object with a (Vertical) Layout Group. The toggle sets that game object active / inactive.
Inside the layout group you have your fields.
If you use my Asset Better UI (see signature) you can use “Better Toggles” instead of Toggles. They already provide functionality to set game objects active / inactive when the trigger changes (on / off) without the need of writing one line of code.