- Home /
Recreate Unity Editor Window in Game
What would be the best way to recreate a "inspector" like UI panel that can be easily extended with various different scripts. For example for an RTS game, you have the base template functions when you click on the building object, but then depending on the type of building selected additional related ui elements tied to related scripts show up.
Is there any example of this being achieved in Unity. I'm yet to find any C# or Unity thread that breaks down a good best practice for such concept.
I don't know that there's any special way to go about this. You'd want to standardize as much as possible, so that you can re-use any common UI elements you need to create. If you have a concept which will be repeated in multiple types of menus, make it a class, and make the element+class into a prefab you can clone as needed. Have a "menu factory" class that builds your sub-menus and stuff to specification as needed, or, if it's more prudent, you can manually create every possible menu variant as a prefab ins$$anonymous$$d.
Your answer
Follow this Question
Related Questions
Unity 4.6B UI Scrollbar Usage 1 Answer
Loading built-in resources 1 Answer
Script Two Button Functions At Once 1 Answer
[4.6 - UI] Calling function on button click via script 1 Answer
Toggle UI 4.6 0 Answers