Setting Loaded Gameobjects as GameObject variables
Posted: Tue Feb 27, 2024 2:11 pm
Hi, I have the issue that loaded game objects are not handled as normal game objects. After assigning it to a gameobject variable, it is not fully functional. Setting a tag is possible but changing the parent isn't just like also getting the transfrom (seems not to have a transform). Finding the gameobject by Gameobject.Find and FindbyTag is not possible.
As info the original gameobject was child of a parent gameobject that I have to delete in my game and I need the load the gameobject again and set the parent to a new created parent game object which may create the issues.
My workround is to use the gameobject of the loaded gameobject to instantiate a new gameobject and delete the loaded one. So I get a fully functional gameobject. Is this a bug? Or do I have to do something different when loading?
Thanks.
As info the original gameobject was child of a parent gameobject that I have to delete in my game and I need the load the gameobject again and set the parent to a new created parent game object which may create the issues.
My workround is to use the gameobject of the loaded gameobject to instantiate a new gameobject and delete the loaded one. So I get a fully functional gameobject. Is this a bug? Or do I have to do something different when loading?
Thanks.