Page 1 of 1

Load is not working on another scene

Posted: Fri Dec 27, 2019 11:09 am
by NnE0
I wrote some code to save and load sprites.
I using this code

save:
ES3.Save<Sprite[]>("Sprites", sprites, filePath); //sprite is array of Sprite

load:
sprites = ES3.Load<Sprite[]>("Sprites", filePath);

and this code works fine in the same scene.

But when i restart game mode on unity, then these sprites can't be loaded.
In inspector, The elements of array(sprites) are empty but the length is loaded successfully.
What is the problem?

Re: Load is not working on another scene

Posted: Fri Dec 27, 2019 12:05 pm
by Joel
Hi there,

It's not possible for me to replicate this from what you've said. Please could you create a new project with the minimal amount of code required to replicate this and private message it to me?

It sounds like there's not a reference to the Sprites available in the scene you're trying to load from, so the loaded references cannot be resolved.

All the best,
Joel

Re: Load is not working on another scene

Posted: Fri Dec 27, 2019 1:25 pm
by NnE0
Joel wrote:Hi there,

It's not possible for me to replicate this from what you've said. Please could you create a new project with the minimal amount of code required to replicate this and private message it to me?

It sounds like there's not a reference to the Sprites available in the scene you're trying to load from, so the loaded references cannot be resolved.

All the best,
Joel
I sent you pm with google drive link because example project file size is bigger than allowed size(256kiB).
If you find something wrong, reply again please.
Thank you.