- Can Instantiate objects in a Scene
-
For example, in the case of UI Buttons, the number of buttons can be increased while maintaining the “press a button to call XXX” behavior.
-
As for which button was pressed…, if you pass Transform as the argument of the button, you can use it since you can get the Index.
https://docs.unity3d.com/ScriptReference/Object.Instantiate.html
https://qiita.com/Teach/items/c28b4fe5ca8dc4c83e26
This page is auto-translated from /nishio/オブジェクトの動的追加 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.