Hello!
I want to know that how can I use more than one savefile at the same time?
For example:
1.I have a savefile named "File1",this is the main savefile,the file is big so that I will not read/write it frequently.
2.At the same time, I have another savefile named "File2",this is for some small values like game settings.
3.public int value1;
public float value2;
4.I want to save the value1 to the "File1", and save the value2 to the "File2".How to do that?
5.Still,if I want to load the value1 from "File1", and load the value2 from "FIle2".How to do that?
In my understanding, the method "ES3.save/load" means save or load to/from the default savefile.But how can I save/load value directly to/from an appointed savefile?Like "File2".
Thank you very much!
How can I have more than one savefile at the same time?
-
- Posts: 3
- Joined: Tue May 21, 2024 3:40 pm
Re: How can I have more than one savefile at the same time?
Hi there,
You can simply specify the filePath parameter of the Easy Save methods. See the Getting Started guide for more information:
https://docs.moodkie.com/easy-save-3/ge ... me-or-path
All the best,
Joel
You can simply specify the filePath parameter of the Easy Save methods. See the Getting Started guide for more information:
https://docs.moodkie.com/easy-save-3/ge ... me-or-path
All the best,
Joel
-
- Posts: 3
- Joined: Tue May 21, 2024 3:40 pm
Re: How can I have more than one savefile at the same time?
Thank you!
But I still have a question:
For example,I have a ES3File named "SettingCache",like below:
public static ES3File SettingCache;
Is there any way I can use it in ways like "SettingCache.Load(key)" or "SettingCache.Save(key)"?
I have searched the API , there is one "ES3.FileExists("xxxx")". Can I relate the ES3File"xxxx" to my "SettingCache"?
Hope for your help!
Thanks!
But I still have a question:
For example,I have a ES3File named "SettingCache",like below:
public static ES3File SettingCache;
Is there any way I can use it in ways like "SettingCache.Load(key)" or "SettingCache.Save(key)"?
I have searched the API , there is one "ES3.FileExists("xxxx")". Can I relate the ES3File"xxxx" to my "SettingCache"?
Hope for your help!
Thanks!
Re: How can I have more than one savefile at the same time?
Hi there,
You shouldn't be using ES3File, this is an internal API which was deprecated quite a few years ago and isn't in our documentation. You should be using caching instead:
https://docs.moodkie.com/easy-save-3/es ... ng-caching
All the best,
Joel
You shouldn't be using ES3File, this is an internal API which was deprecated quite a few years ago and isn't in our documentation. You should be using caching instead:
https://docs.moodkie.com/easy-save-3/es ... ng-caching
All the best,
Joel
-
- Posts: 3
- Joined: Tue May 21, 2024 3:40 pm
Re: How can I have more than one savefile at the same time?
Thank you, Joel!
I understand that.
It means that whether I use the "ES3.Load<T>(key, filepath)" ,or I use the cache,right?
I have solved the problem,it seems to work well.
Thanks a lot!
I understand that.
It means that whether I use the "ES3.Load<T>(key, filepath)" ,or I use the cache,right?
I have solved the problem,it seems to work well.
Thanks a lot!
Re: How can I have more than one savefile at the same time?
The method in the performance guide using ES3.Load is using caching. I.e.using an ES3Settings object to set the location to Cache, and then using this with ES3.Save/ES3.Load/ES3.CacheFile/ES3.StoreCachedFile:It means that whether I use the "ES3.Load<T>(key, filepath)" ,or I use the cache,right?
Code: Select all
// Create an ES3Settings to save to and load from the cache.
var settings = new ES3Settings(ES3.Location.Cache);
Joel