Saving and loading components

Discussion and help for Easy Save 3
Post Reply
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Saving and loading components

Post by Keeko »

I am saving a component on a game object i have created. This is so I can save the variables and pieces of data under one key like this:
CaptureEasysave2.JPG
CaptureEasysave2.JPG (47.24 KiB) Viewed 1462 times
This saves correctly, but it doesn't load correctly.

I am using LoadInto like so:
ES3.LoadInto(gameObject.name + "_" + guidReference + "_itemProducer", this);

Is this the recommended way to load the component state from file and overwrite?
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving and loading components

Post by Joel »

Hi there,

Please could you explain how it's not loading correctly?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Re: Saving and loading components

Post by Keeko »

the input, output and fuel items just remain the same as they were before.
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Re: Saving and loading components

Post by Keeko »

I am using a raycast sphere to find objects that are interactable around the player. The component is updating but for whatever reason, when I then interact with the object (a container with items in this case) it is returning the old component state. Does loading a component instance state into itself update the object itself?
Keeko
Posts: 17
Joined: Sun Nov 15, 2020 9:18 pm

Re: Saving and loading components

Post by Keeko »

Actually nevermind i think i have found the issue.
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving and loading components

Post by Joel »

Glad you've (hopefully) managed to find the issue. Let me know if you run into any other problems.

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