what will happen if we make one gameobject equal to another gameobject?
Assume that both gameobjects have several scripts attached to them and both gameobjects have a few children.
PS: gameobject1 and gameobject2 are both from different prefabs.
If you do
gameObject1=gameObject2, you will lose the reference to the actual gameObject1, and both variables will point to the same object (meaning, if you destroy gameObject2, gameObject1 will also become null).
Is there an easy way to set one GO to equal another?
eg. I have a dummy object that (filler/default figure GO) that I want to replace with the players chosen figure at runtime after the selection is made.
I want to take the empty “Face” GO and replace it with user selected “Face” GO without having to replace the mesh, the materials etc all individually.
Well, it’s quite heavy for your scene and really sketchy but you can make 2 object with the same x,y,z values and then switch which one is active when you need it, but it’s like patchwork and I don’t really like it. It’s “KIND OF” a solution…
Well If someone knows how to do it properly I would be glad 'cause i need it to… <3