Set Fields on inactive object?

Discussion and help for Easy Save 3
Post Reply
Notso
Posts: 51
Joined: Sat May 08, 2021 6:53 pm

Set Fields on inactive object?

Post by Notso »

I have enemies that are inactive on start, they are out of site.
Can I save their info and load it as well?
I just did a transform test
(I did make a reference to it in scene in a list)
save gameobject.transform while it was in view playing then quit and new game hit load and he was at his starting position but the player went to where I was supposed to be.
The game system disables the objects at runtime since they have to be registered with my AImanager and get disabled when not in view (in another room etc)
I need to be able to change values on an inactive object.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Set Fields on inactive object?

Post by Joel »

Hi there,

You should be able to change values on an inactive object as long as your save and load code isn't in a script on that object (otherwise none of it's events will be called).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Notso
Posts: 51
Joined: Sat May 08, 2021 6:53 pm

Re: Set Fields on inactive object?

Post by Notso »

Thanks. Haven't tested it yet but I noticed that I was saving the empty parent and not the actual AI child!
That would explain why the AI was always at the start point...
At least I hope this is the case.
Post Reply