Unity UI: UI for arbitrary numbers of unknown objects
ADVANCED level
Creating UI for an arbitrary number of unknown objects?
Step 1: Put all their UI prefabs into a vertical list.
Step 2: UI prefab has an instance of the object on it, allowing UI creators to wire it all up using UnityEvents and the inspector, no code.
Step 3: Use reflection to
A) copy the properties from the in-game object to the UI object
B) change the UI elements (drop down list, text box, etc) to the object's values using UnityEvents, so the UI creator can wire them up.
C) copy the properties from the UI object to the in-game object if anything changes.
Weak points: Lots of annoying boilerplate when creating new editable classes, since you need to throw a Unity Event whenever anything changes in order to properly set up the UI elements.
Not sure how clear I am, because I'm so far into my own game that I don't know how common this stuff is.
Other Videos By Craig Perko
2016-09-17 | Voxel Octrees: What Are They? |
2016-08-28 | Merge Multi-Material Meshes in Unity |
2016-08-14 | Game Design: The Content Swamp |
2016-08-13 | Games Like No Man's Sky |
2016-08-12 | No Man's Sky Review |
2016-08-12 | No Man's Sky Play |
2016-08-02 | Abzu the Fish Whisperer |
2016-07-31 | Unity UI: Highlander Menus |
2016-07-20 | Ambient Audio: Green River Raw |
2016-07-10 | What Did I Like About Star Trek |
2016-07-01 | Unity UI: UI for arbitrary numbers of unknown objects |
2016-06-27 | Let's Design the Galactic Line: Interiors |
2016-06-24 | Let's Design the Galactic Line: Game Making |
2016-06-12 | Minotaur Heavy Drone Carrier (Space Engineers) |
2016-05-31 | Burning Down: Space Engineers Goofery |
2016-05-23 | Map Zooming: Let's Design the Galactic Line |
2016-05-22 | Unity UI: The Nine Slice |
2016-05-14 | Let's Design the Galactic Line: Character Randomization |
2016-05-08 | Let's Design the Galactic Line: Rigging Start! |
2016-05-07 | Tech Talk: UMA Rigging Analysis |
2016-05-06 | Tech Talk: Rigging and Morphing! |