Build causes error

Discussion and help for Easy Save 3
Post Reply
AnnasEden
Posts: 5
Joined: Tue Sep 17, 2019 5:15 pm

Build causes error

Post by AnnasEden »

Hello Forums! I have a big issue currently.
A while ago I had a problem saving informations from a prefab. I got great help and could fix it. I "Finished" my project so to speak and builded it and noticed something... While saving data from the prefab works PERFECTLY in playmode... it doesn't work and breaks in the finished product in the same way it did when I first haven't had any reference in the scene and no ES3 Prefab component on the prefab! I don't know what to do... since it works without any trouble when I have it in playmode! What could possibly be wrong?

Greetings, Anna
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Build causes error

Post by Joel »

Hi there,

Please could you provide more information on the errors you are receiving? It's hard to tell what is happening from what you've said.

Also just to check, have you accounted for the case where there is no save data when the app is first installed? You can replicate this in the editor by deleting your save data.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
AnnasEden
Posts: 5
Joined: Tue Sep 17, 2019 5:15 pm

Re: Build causes error

Post by AnnasEden »

Well I don't know if there is a log or something somewhere... I haven't found one, I try building it as development build with a debugger so that I can look into it better. This is kind of my first unity project where I am in charge of programming so ye...

The issue is the following:
I pick up an object in the scene. from that object a UI element is created which is a prefab that gets a Sprite, a name, and some text. All of that is saved in a dictionary and later ofcours ein an es3 File.
The prefab has the ES3 Prefab component on it, and ist referenced on a Don't Destroy ON Load Item that is present in every scene.
My game is a Point and Click adventure so you switch between lots of scenes and that is where the problem apparently occurs, exclusively in the build at this point.
When I am in Scene A and I pick up a key, I save, I end the game, I load it back, Everything works.
When I am in Scene A I pick up a key, I go to scene B, I save, I end the game, I load it back, the UI Item can't load the sprite anymore and it loades some buggy something! Its not loading a white standard Sprite, like it did before, when I set it up falsely, it looks more like a buggy sprite?
AnnasEden
Posts: 5
Joined: Tue Sep 17, 2019 5:15 pm

Re: Build causes error

Post by AnnasEden »

Well, apparently making a development build fixed it xD
I forgot to tick Read/write enabled in the options of the sprites I was loading. My bad :lol:
So: problem solved!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Build causes error

Post by Joel »

Glad you've managed to find a solution to your issue :)

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