Saving and Loading not carrying over to next play.
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Saving and Loading not carrying over to next play.
I have spent 3 hours playing around with this as someone who's not a great programmer. Using example function and code from "Getting Started" Click play; click save (bound to Keycode.S); click load (bound to L); this loads integer; click stop in unity; click play; click load; does not load!
Please explain, thank you.
Please explain, thank you.
Re: Saving and Loading not carrying over to next play.
Hi there,
Please could you show me the code you are using so I can understand what is happening?
All the best,
Joel
Please could you show me the code you are using so I can understand what is happening?
All the best,
Joel
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Re: Saving and Loading not carrying over to next play.
Here you go, hopefully easiest enough to understand
- Attachments
-
- SandLTrial.cs
- (621 Bytes) Downloaded 161 times
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Re: Saving and Loading not carrying over to next play.
Apologies for putting this in ES2, this post should be in ES3. I also appreciate you looking at this. The script uses I to increment the int, D to log the int, S to save the int and L to load int. Other than that it uses the code from "Getting started".
Re: Saving and Loading not carrying over to next play.
Thanks for sending that over.
I've tried it at my end and it appears to work fine for me. Note that if you try to load data before you've saved anything, it will throw an error as you're not currently providing the defaultValue parameter. Note that these are the steps I took:
I also recommend putting Debug.Log calls immediately before your ES3 calls to ensure that they're actually being called.
All the best,
Joel
I've tried it at my end and it appears to work fine for me. Note that if you try to load data before you've saved anything, it will throw an error as you're not currently providing the defaultValue parameter. Note that these are the steps I took:
- Press 'Play'
- Press 'I' multiple times to increment myInt
- Press 'S' to save
- Press the Play button to stop playing
- Press the Play button again to start playing
- Press 'L' to load the data
- Press 'D' to output the loaded value
I also recommend putting Debug.Log calls immediately before your ES3 calls to ensure that they're actually being called.
All the best,
Joel
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Re: Saving and Loading not carrying over to next play.
I think my problems could be solved if I knew where a step by step guide was to setting up?
Re: Saving and Loading not carrying over to next play.
Hi there,
The Getting Started guide should be enough to get set up with Easy Save, and the code you're using is indeed correct and working at my end.
If the code you showed me isn't working for you then this indicates that there's an issue somewhere else in your project. Please could you send me a screenshot of your settings so I can see if that is the issue?
All the best,
Joel
The Getting Started guide should be enough to get set up with Easy Save, and the code you're using is indeed correct and working at my end.
If the code you showed me isn't working for you then this indicates that there's an issue somewhere else in your project. Please could you send me a screenshot of your settings so I can see if that is the issue?
All the best,
Joel
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Re: Saving and Loading not carrying over to next play.
Thank you Joel, I really appreciate the reply. The problem was just simply the default value. I don't understand the purpose of the default value, is there anywhere I can read about it? I just made my own variable called defaultvalue and ran it through, that worked fine but I don't know why it worked which worries me!
Thanks again, Cheers from Aus.
Thanks again, Cheers from Aus.
Re: Saving and Loading not carrying over to next play.
Hi there,
The default value is the value returned if no data exists. If you don't set a default value, an exception will be thrown if you try to load data which doesn't exist (i.e. data which hasn't been saved yet).
You can find out about the default value in the page for ES3.Load:
https://docs.moodkie.com/easy-save-3/es ... /es3-load/
All the best,
Joel
The default value is the value returned if no data exists. If you don't set a default value, an exception will be thrown if you try to load data which doesn't exist (i.e. data which hasn't been saved yet).
You can find out about the default value in the page for ES3.Load:
https://docs.moodkie.com/easy-save-3/es ... /es3-load/
All the best,
Joel
-
- Posts: 9
- Joined: Thu Jul 02, 2020 4:37 am
Re: Saving and Loading not carrying over to next play.
Hi Joel,
I appreciate you taking the time but Ive reached the point where I sadly will be applying for a refund, reviewing and just saving with my own scripts (Edit: if I cant get it working today, ive just spent too much time trying to figure it out). Its just not as described "Easy to save". If for some reason you can explain what Im doing wrong then I will be stoked. Please find attached code. I press play it saves and loads upon the next play. Doing it a third does not load the save anymore. Unity project then gets an asterix stuck next to it even when I hit File save for unity and then easy save no longer carries saves over to the next run until using a new key. Please see attached, again, thanks for taking the time out of your day to at least try to help. No scripts interfere with this script as im still just trying to figure out your software! At the end of the day what you have might be excellent but there is just no clear instructions on how to get it working, videos could be much easier than the getting started page, its just to simple with lack of direction imo from an amateur programmer pov (4 years ish). Hope this helps for helping others of my low level of understanding.
Kind Regards
I appreciate you taking the time but Ive reached the point where I sadly will be applying for a refund, reviewing and just saving with my own scripts (Edit: if I cant get it working today, ive just spent too much time trying to figure it out). Its just not as described "Easy to save". If for some reason you can explain what Im doing wrong then I will be stoked. Please find attached code. I press play it saves and loads upon the next play. Doing it a third does not load the save anymore. Unity project then gets an asterix stuck next to it even when I hit File save for unity and then easy save no longer carries saves over to the next run until using a new key. Please see attached, again, thanks for taking the time out of your day to at least try to help. No scripts interfere with this script as im still just trying to figure out your software! At the end of the day what you have might be excellent but there is just no clear instructions on how to get it working, videos could be much easier than the getting started page, its just to simple with lack of direction imo from an amateur programmer pov (4 years ish). Hope this helps for helping others of my low level of understanding.
Kind Regards
- Attachments
-
- SandLTrial.cs
- (697 Bytes) Downloaded 153 times