Dynamically create toggles and link them to Objects?
Hi, how can I link dynamically created toggles to a objects (not GameObject) so onValueChange will call a method of my object...
My current approach is keeping all the toggles in a list and each time on toggle is change, the whole list is iterated and updates a list of my objects accordingly. But this is neither very efficient, nor do I know which exact toggle was triggered...
What's the best way? Thanks in advance.
Comment
What do you mean by Objects, not GameObjects? You mean Unity.Object
?
Your answer
![](https://koobas.hobune.stream/wayback/20220612130625im_/https://answers.unity.com/themes/thub/images/avi.jpg)