bmegli / ev3dev-mapping-ui

A cross-platform real-time 3D spatial data visualization
GNU General Public License v3.0
9 stars 4 forks source link

Move components UI from prefabs to components #8

Closed bmegli closed 8 years ago

bmegli commented 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.

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.