Hi there,
I couldn’t find this anywhere on forums or answers, sorry if I’ve missed it somewhere.
I’m instantiating a prefab at runtime using C#. I’d like to pass settings to scripts attached to the prefab at instantiation.
Normally if I was doing this via a class I’d pass the parameters to the Initializer of the class during the new myClass(args…) call. I assume I can’t pass args via the Instatiate function?
Is the only way to use GetComponent on the newly instantiated Prefab and call a custom Init function on the attached script?
Thanks experts!
Richard