[Unity5] Custom UI multiple Checkbox with Buttons?
Hey guys, I am trying to develope a multiselectable, dynamically panel.
It should look something like this:
OnClick or selecting those, it should change it's color about 10% darker (so one realizes, it's pressed)
How would you guys do it? At the moment, I'm thinking about having a panel in which I would dynamically append buttons to it. But doing it this way, it would be inefficiently, wouldnt it? Because actually, the 'buttons' should only change their value (isActivate or !isActive), which a checkbox has it's sense for, and in addition, I'd have to render the buttons according to their value by myself. So is there a way to edit the checkboxes (are there even checkboxes in Unity5d actually, lol?)
Kind Regards
PS: Sorry for the wrong Tag, I couldnt chose some like: Unity5d GUI UI Checkboxes or something, hasn't been found
Are you looking to do this via Unity's UI system, or the legacy GUI system?
I assume you know the difference between the two, if not; the UI system is more GameObject driven, while GUI tends to be script driven. The UI system is much more efficient as well.
Someone said, that one should use the legacy GUI System only for testing, so I decide for UI. Wanted to express that by saying Unity 5, sorry.
And I got another, tiny question: When I have a prefab, how can I link it e.g. a button without it being existant on a panel or something? At the moment, I got a panel and created an empty prefab. Now I create a button and I can link it to the asset (drag&drop), but then there is automatically the created button on my panel, too.
Thank you for your help.
Ahh yeah, the GUI is legacy, but UI (without the G) is generally used to refer to the new UI system. I agree, the legacy should (except for rare cases) be only used for prototyping.
Additional questions should be posted in their own thread, check out the FAQ for more info.