Closed bmegli closed 8 years ago
Scripts that have prefabs to set which in turn have prefabs to set are difficult to maitain and internal communication is difficult.
Just use Unity component model instead.
The component (Laser) automatically adds its UI component LaserUI which adds its elements to UI.
Same for Drive/Odometry etc.
Each component specifies its UI with [RequireComponent] attribute.
The component communicates with its UI using usual between component communication
The only prefabs that can be set are those customizing the UI but even those have their defaults.
Scripts that have prefabs to set which in turn have prefabs to set are difficult to maitain and internal communication is difficult.
Just use Unity component model instead.
Idea
The component (Laser) automatically adds its UI component LaserUI which adds its elements to UI.
Same for Drive/Odometry etc.
Each component specifies its UI with [RequireComponent] attribute.
The component communicates with its UI using usual between component communication
The only prefabs that can be set are those customizing the UI but even those have their defaults.