Setting Loaded Gameobjects as GameObject variables

Discussion and help for Easy Save 3
Post Reply
Taratus
Posts: 2
Joined: Tue Feb 27, 2024 2:00 pm

Setting Loaded Gameobjects as GameObject variables

Post by Taratus »

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.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Setting Loaded Gameobjects as GameObject variables

Post by Joel »

Hi there,
Setting a tag is possible but changing the parent isn't just like also getting the transfrom (seems not to have a transform)
I'm not sure I understand. It's impossible for a GameObject to exist without a Transform, and I've never heard of behaviour like this before. Please could you replicate this in a new project with a very simple scene which isolates it to Easy Save (i.e. no other assets) and send me a link to it on moodkie.com/contact along with step-by-step instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply