2
How do I instantiate an Object in another class?
I’m trying this way:
GameObject Cozinha = new GameObject("CenaCozinha");
CenaCozinha coz = Cozinha.AddComponent<CenaCozinha>();
But I believe that so he is creating a new Object, hence all that I have already put in the original 'Kitchen' (how to feed lists for example), will not exist in the new.
You must pass the instance of the object created by a function and save to a property in its new class.
– Paulo Victor
um, can exemplify pfvr?
– Emerson Barbosa
I’ll post an answer!
– Paulo Victor
Okay, thank you :D
– Emerson Barbosa