ES3.Load Behavior Question

Discussion and help for Easy Save 3
Post Reply
Ptolemie
Posts: 7
Joined: Mon Apr 24, 2023 8:45 pm

ES3.Load Behavior Question

Post by Ptolemie »

Hey there, I have a prefab instance whose transform.position I'd like to retain when loaded. Currently, when I call the ES3.Load function, my instance is loaded with the prefab's original transform.position, rather than the instance's. Calling the load function a second time moves the prefab instance to its saved instance position, as expected. So I get the behavior I need, but only after calling the load function twice.

I'm wondering why this occurs on the second call, rather than on the first. Does it have something to do with this statement in the Saving & Loading GameObjects & Prefabs guide, "Easy Save will create an instance of the prefab if it doesn’t exist in the scene"?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3.Load Behavior Question

Post by Joel »

Hi there,

The only times I've seen this behaviour the cause has been because there is somewhere else in the code which is changing the position. Is this the case for you?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Ptolemie
Posts: 7
Joined: Mon Apr 24, 2023 8:45 pm

Re: ES3.Load Behavior Question

Post by Ptolemie »

I thought that might be the case. In an attempt to assess that, I debugged with breakpoints at Start/Awakes in each of my prefab instance's components. This may or may not be a flawed approach to zeroing in on the problem, but my results showed no positional changes until passing each of my breakpoints.

I noticed editing the root prefab asset's position changes where it loads the first time, in case that offers any more clues. As in, in the Open Prefab window, edits to the position reflect where they will appear on the first load.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3.Load Behavior Question

Post by Joel »

Hi there,

Please could you create a new project with a simple scene which replicates this and private message it to me with instructions.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Ptolemie
Posts: 7
Joined: Mon Apr 24, 2023 8:45 pm

Re: ES3.Load Behavior Question

Post by Ptolemie »

Hey it looks like the project file is too big to PM, even compressed. Should I PM you a drive or dropbox link?
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: ES3.Load Behavior Question

Post by Joel »

Hi there,

A Google Drive or Dropbox link is fine. Just ensure that the project is a new project and not an existing project or a reduced version of an existing project, as otherwise I won't be able to isolate the issue to Easy Save.

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