Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Easy Save - The Complete Save Data & Serialization Asset

Discussion in 'Assets and Asset Store' started by JoelAtMoodkie, May 28, 2011.

  1. DataportKultur

    DataportKultur

    Joined:
    May 5, 2022
    Posts:
    3
    You were right. The http:// was missing. Thank you for your great support! :)
     
    andreiagmu and JoelAtMoodkie like this.
  2. andreiagmu

    andreiagmu

    Joined:
    Feb 20, 2014
    Posts:
    119
    Maybe you could add the EasySave assembly definitions (for runtime and editor) inside a .unitypackage included in the main asset?
    That way, their installation would be optional to the user.
    Other assets use this solution to include their .asmdefs. ;)
     
    Last edited: Oct 5, 2022
    JoelAtMoodkie likes this.
  3. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    Great idea. If we find that users are having issues creating their own asmdefs then we will indeed include this option.

    All the best,
    Joel
     
    andreiagmu likes this.
  4. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,729
    Hi @JoelAtMoodki
    I noticed you added serialization/deserialization support for NativeArray, which is great
    Any plans for adding support for NativeList and NativeHashMap too?
    Thanks
     
  5. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    We've not currently added support for NativeList/NativeHashMap as they exist in a package which is not bundled with Unity, and Unity doesn't provide a reliable way of conditionally compiling based on whether a package is installed or not yet. Once there's a way of doing this, or we find a reliable way of achieving this ourselves, we'll be able to add support.

    All the best,
    Joel
     
    jGate99 likes this.
  6. moayad-jawaker

    moayad-jawaker

    Joined:
    Mar 4, 2020
    Posts:
    8
    Hello @JoelAtMoodkie
    We are using EasySave3 version 3.3.1 f10 and we are getting a lot of errors like below
    NullReferenceException: Object reference not set to an instance of an object. on function
    ES3Writer.Merge
    And it did not happen before and we did not change any line of code.
    please check the attached image from Backtrace.
    we are using unity 2019.4.16.
    Any idea what happens?
     

    Attached Files:

    Last edited: Oct 15, 2022
  7. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    As you are using a very old version of Easy Save I recommend making a backup of your project and updating to the latest version (3.5.1).

    If this doesn’t resolve your issue, and as we’ve had no other reports of this, please could you replicate this in a project containing only the bare minimum to replicate it and private message it to me with instructions.

    All the best,
    Joel
     
  8. moayad-jawaker

    moayad-jawaker

    Joined:
    Mar 4, 2020
    Posts:
    8
    Hello @JoelAtMoodkie,
    Thanks for your response, actually this is the first step that I will do, to update to the last version but this issue has not happened before.
    I will let you know if this happened after the upgrade.
    Thanks again
    Moayad
     
    JoelAtMoodkie likes this.
  9. Moayad

    Moayad

    Joined:
    Feb 28, 2016
    Posts:
    1
    Hi @JoelAtMoodkie,
    I have updated the Assets from the package manager inside the unity editor to the last version 3.5.1, download then import, but in the change log file in the assets, the last edit you added is 3.4.2, so is it missing from your side?
    please check the attached image
     

    Attached Files:

  10. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    It looks like the change log file wasn’t updated before submission, but rest assured that you’ve updated from the package Manager then you will be on the latest version.

    All the best,
    Joel
     
  11. Scalisco

    Scalisco

    Joined:
    Feb 2, 2014
    Posts:
    12
    Hi @JoelAtMoodkie ! Is the cached file settings supposed to GC Alloc whenever Save or Load is called? I am getting a lot of GC Allocs when loading and saving, and I'm pretty sure I have the cache enabled. If it's intended, then I guess we're supposed to limit how many times we call save and load in general.
     
  12. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    Caching means that the data is stored in memory, so it’s necessary to allocate memory when you save (and when you load in order to deserialise that data via a stream).

    The amount of memory allocated will be proportional to the amount of data you’ve stored in the cache.

    All the best,
    Joel
     
  13. Gatskop_Software

    Gatskop_Software

    Joined:
    Sep 21, 2014
    Posts:
    86
    Using playmaker is anybody else getting this error I did set up the PHP file and MySQL server tried to do a file sync but the documentation is outdated. Not 100% sure what to do first 1.File Exist 2.If not ES3 File Create 3. If exist ES3 Cloud Sync. When I press the button it get a file don't exist on created file I get this
    Button : FSM : State 6 : ES3FileCreate : System.ArgumentException: Extension of file in Resources must be .json, .bytes, .txt, .csv, .htm, .html, .xml, .yaml or .fnt, but path given was "SaveFile.es3"
     
    Last edited: Oct 30, 2022
  14. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there, and thanks for getting in contact.

    It looks like you’re trying to load an ES3 file from resources but you’ve not given it the extension .bytes, which is a requirement at Unity’s end. Please see the Saving and Loading from Resources guide for more information:

    https://docs.moodkie.com/easy-save-3/es3-guides/saving-loading-resources/

    All the best,
    Joel
     
  15. Grasshopper2020

    Grasshopper2020

    Joined:
    Apr 5, 2020
    Posts:
    6
    Hello, apologies if this is not the right place to post, I can't see a 'create new thread' although pretty sure someone has asked this before. What is the easiest way to save score and music, and load it on any scenes please? I am a bit confused and I can't seem to find a simple example, please note my programming skills are limited, many thanks in advance
     
  16. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    You can find information on basic usage of Easy Save in the documentation:
    https://docs.moodkie.com/product/easy-save-3/

    In particular I recommend taking a look at the Getting Started guide to begin with:
    https://docs.moodkie.com/easy-save-3/getting-started/

    Regarding saving music, I assume you mean saving AudioClips. This is covered here, in the Saving audio files tab:
    https://docs.moodkie.com/easy-save-...oading-images-audio/#saving-and-loading-audio

    You can also find example projects on our forum here:
    https://moodkie.com/forum/viewforum.php?f=15

    All the best,
    Joel
     
  17. Grasshopper2020

    Grasshopper2020

    Joined:
    Apr 5, 2020
    Posts:
    6
    Thank you for this Joel, I am a bit lost, as it says to save
    • To save a value, use ES3.Save
    • To load a value, use ES3.Load however not sure where to write this exactly? I added an ES2 Auto save script to my points text, to carry it to the next scene, and I also ticked it in the Easy Save scene - I would appreciate a fast video or an example, eg.. add to game object component x or do I add it in the coin.cs script somewhere? Thank you!
     
  18. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    If you’re using Auto Save then you don’t need to call any code, and just need to follow the Auto Save guide:

    https://docs.moodkie.com/easy-save-3/es3-guides/auto-save-saving-without-code/

    You can find and example projects for Auto Save here:

    https://moodkie.com/forum/viewtopic.php?f=18&t=1468

    If you’re using code, the Getting Started guide has information on where you can call code:

    However, it largely depends on your project. In short, you can the Save code when you want to save, and the load code when you want to load. When you need to save and load is dictated by your project rather than at our end.

    You can find sample projects for code here if that helps:
    https://moodkie.com/forum/viewforum.php?f=16

    All the best,
    Joel
     
  19. Grasshopper2020

    Grasshopper2020

    Joined:
    Apr 5, 2020
    Posts:
    6
    Thank you for this, I am afraid I am still a little bit lost as I never learnt programming properly

    What I tried:

    Scene 1

    1. Added Easy Save 3 Manager to scene
    2. It has a ES3 Reference Mgr showing a Points (ES3 Prefab)
    3. ES2 Auto Save Mgr I ticked 'points' to be saved

    Scene 2

    1. Added Easy Save 3 Manager to scene
    2. It has a ES3 Reference Mgr showing a Points (ES3 Prefab)
    3. ES2 Auto Save Mgr I ticked 'points' to be saved

    Points do not transfer from Scene 1 to 2

    Also I tried

    Scene 1: adding a ES3 Prefab script to the Points prefab
    Scene 2: adding the same ES3 Prefab script

    Could you please let me know all the components required to transfer points from one scene to the other?

    I have a tight deadline for Apple (they will otherwise remove my app from the store)

    Many thanks in advance
     
  20. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    You shouldn't manually add or modify Easy Save Components on the GameObjects. You should only interact with Auto Save using the Auto Save window (Tools > Easy Save 3 > Auto Save), and ES3Prefab using the Easy Save 3 > Enable Easy Save for Prefab menu item.

    You also seem to be mentioning an ES2AutoSaveMgr Component. I suspect this might be a typo but it should be an ES3AutoSaveMgr Component.

    So that I can provide specific assistance, please could you replicate your issue in a new project with a pair of simple scenes and private message it to me with instructions.

    All the best,
    Joel
     
    Last edited: Nov 5, 2022
  21. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,410
    Hi Joel, is it possible to serialize Playmaker's FSM nodes and states with Easysave?
    My intention is to be able to mod the logic of an already published game without having to make a new build of the game.
     
  22. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there, and thanks for getting in contact.

    The nodes and states of PlayMaker are not serializable at runtime, and only things such as FsmVariables are. This is because FSMs rely on types which C# provides no way of reconstructing at runtime.

    All the best,
    Joel
     
  23. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,410
    Sorry for not being more clear with the question. We don't want to serialize at runtime, we are creating the playmaker logic in the editor and want to be able to serialize it with easysave in the editor. Then upload that new logic to be used in runtime.
     
  24. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    You would still need to deserialise it at runtime, which has the same limitations.

    All the best,
    Joel
     
  25. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,410
    Ok, thanks for the clarification.

    We are also using Adventure creator Actionlists. Would this be the same situation?
     
  26. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    I'm afraid I have no experience with that asset so wouldn't be able to say. However, you can find information on what types of data and fields/properties will be saved automatically with Easy Save here:
    https://docs.moodkie.com/easy-save-3/es3-supported-types/

    All the best,
    Joel
     
  27. nobluff67

    nobluff67

    Joined:
    Nov 3, 2016
    Posts:
    307
    Cut and paste from your site:

    ES3.SaveRaw("test", "myFile.txt");

    Where is the file stored? I have searched the entire project directory and can not find a file.

    EDIT: Found it, its in appdata. I thought it would be in project folder so you can load it as a resource.
     
    Last edited: Nov 17, 2022
  28. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    832
    Hi there,

    By default data is stored in Unity’s PersistentDataPath because this is the only place guaranteed to be writable at runtime and in a build (the project folder doesn’t exist at runtime on most platforms). If you wish to save elsewhere you can provide an absolute path instead of a relative path/filename.

    For more information on paths and storage see the relevant guide:
    https://docs.moodkie.com/easy-save-3/es3-guides/settings-paths-locations/

    All the best,
    Joel
     
    nobluff67 likes this.