Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Easy Save - The Complete Save Data & Serialization Asset

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

  1. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Ahh I understand now :)

    If you're only saving/loading Vector3s, ints and floats then you don't need to worry about destroying them, as garbage collection will collect them automatically. It's only when loading Components without using self-assigning load that you need to worry about destroying the Component and GameObject yourself.

    Also note that the ES2Data object will itself be garbage collected when nothing references it, the same as any other class. As this is more a question about how garbage collection works in .NET rather than an Easy Save specific question, you may want to ask about this on somewhere like StackOverflow as they'll be able to provide more detailed information regarding this.

    All the best,
    Joel
     
  2. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi,

    I've bought this asset long time ago and I've almost forgot to have it!
    So I think is arrived the time to use it due to our status of our game.
    Could you please answer the following question:


    can I use EasySave2 to save ALL the scene (positions/locations) at once? (without doing for each object).
    If not which is the best approach considering that I would have like 20 GameObjects that need to be "saved"?

    Best regards,

    Dom
     
  3. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Hi Dom,

    It's not possible to do this automatically, but it's fairly easy to this via code if you put all of your GameObjects Transforms into an array. Then the most efficient way would be something like this:

    Code (CSharp):
    1. // Our array of the Transforms of our GameObjects.
    2. // We can assign to this in the Editor.
    3. public Transform[] transforms;
    4.  
    5. public void Save()
    6. {
    7.     ES2.Save(transforms, "myFile.txt?tag=transforms");
    8. }
    9.  
    10. public void Load()
    11. {
    12.     if(ES2.Exists("myFile.txt"))
    13.         ES2.LoadArray<Transform>("myFile.txt?tag=transforms", transforms);
    14. }
    All the best,
    Joel
     
  4. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Hey Joel, there's a bit of lag loading in files at runtime, is there a async option? Can we load in from another thread or does it have to be on the main?
     
  5. JoelAtMoodkie

    JoelAtMoodkie

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

    As much of Unity's API isn't thread safe, we can't guarantee thread safety. There are a number of users using Easy Save in a separate thread with success however.

    But instead of this, most people find it easier (and more debuggable) to remove the overhead of random access by saving and loading sequentially using an ES3Reader. I assume you're loading quite a lot of data for there to be lag when calling LoadAll?

    All the best,
    Joel
     
  6. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Does that work with arrays?
     
  7. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
  8. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,081
    I'm working on a save system that saves a screenshot of where the player is to preview to them on the load screen. I notice that ES2 has a Save/LoadImage function which seems to do what I want, but now I'm stuck. It seems to take an absolute path unlike everything else that can take either an absolute or relative path. Is there an easy way for me to get the absolute path to my save folder across multiple platforms (PC/Mac/Linux)?
     
  9. JoelAtMoodkie

    JoelAtMoodkie

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

    ES2.SaveImage and ES2.LoadImage both accept relative and absolute paths.

    All the best,
    Joel
     
  10. bpears

    bpears

    Joined:
    Aug 23, 2012
    Posts:
    249
    Does ES2 Reader and Writer use the same default path in locallow at runtime? I am trying to do so, but it says the file doesn't exist.

    this is how I define path in read and write:
    using (ES2Writer writer = ES2Writer.Create ("someDataFolder/someFile.txt")){

    EDIT: Woops, I forgot to use the Save(false);
     
    Last edited: Feb 10, 2017
  11. DonLoquacious

    DonLoquacious

    Joined:
    Feb 24, 2013
    Posts:
    1,667
    It looks like the forum on the website is broken, just FYI.

    I haven't updated Easy Save in awhile (will be doing it as soon as the asset store server calms down and allows me to), but I seem to recall that it was impossible to move the Easy Save 2 directory before. Is it now possible to move it into a sub-directory? This is really the biggest issue I've had with this asset, IIRC.

    I wouldn't mind a preferences file in the Plugins folder for defining the path, or whatever it takes, but I really need to be able to move that folder. There's both the typical organizational reasons for this (I'm OCD, and everything else from the Asset Store is in the "Third Party" sub-directory already), but there's also the git exclusion for version control becoming a pain in the ass if I have to keep making edits for new assets I download, and general annoyance when there's a bunch of assets that break when you rename their root folder or move it to get a better organizational scheme going.
     
  12. JoelAtMoodkie

    JoelAtMoodkie

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

    Thanks for letting us know about the forums, looks like there was a slight hickup with our hosting provider but it's now been fixed.

    It's not possible to move the Easy Save 2 folder because Unity requires certain files to be in a fixed location for them to work with our DLLs. However, we're intending on structuring things differently in Easy Save 3 so that folders can be moved (Easy Save 3 will be a free update to existing users).

    All the best,
    Joel
     
  13. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    From your asset store page, impressive:

    Easy Save 4.JPG

    On a more serious note, is there a list of known working 3rd party integrations with Easy Save?
     
  14. JoelAtMoodkie

    JoelAtMoodkie

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

    Unity 5 is actually on the image too, but Unity appear to have put a banner in front of it :D



    At current we don't have a list of third-party integrations, though I've found that searching Easy Save 2 and then the name of the product usually tends to work well. If there's any particular product you're after

    The problem with compiling a list at our end has been that most people don't actually let us know they've integrated their product with Easy Save. I've created a thread on our forums however which will hopefully encourage people to come forward and let us know.

    All the best,
    Joel
     
  15. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Oh, I see. They covered it up so exceptionally I didn't realize it was a banner.

    Ive owned Easy Save for a long time, but I'm just reaching the point where I have the other 3rd part assets working together, and I will be creating a main state machine with a "Save" button that lights up Easy Save. Looking forward to putting it through its paces. :)
     
  16. itfcjim

    itfcjim

    Joined:
    Mar 3, 2014
    Posts:
    5
    Hi Joel

    We're using Easy Save in our project and it's working great for Windows / iOS / Android builds - we're hitting a stumbling block though with our WebGL build as we're saving a lot of data, our saves are going over 1MB (well over 1MB) and giving us a console error due to the limitations of PlayerPrefs - wondered if you had any tips on getting around this? Perhaps it would be possible to use IndexedDB / LocalStorage / something else instead for WebGL builds?

    Cheers
     
    Last edited: May 17, 2017
  17. JoelAtMoodkie

    JoelAtMoodkie

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

    Easy Save uses PlayerPrefs on WebGL, which in turn uses IndexedDB. Because the limit is imposed at Unity's end, I've posted a suggestion on their ideas page which you can vote on: https://feedback.unity3d.com/suggestions/increase-the-size-of-playerprefs-on-webgl.

    I've also created a Feature Request on our forums which people can vote on. If there's enough demand for it, we'll definitely look at bypassing PlayerPrefs: http://moodkie.com/forum/posting.php?mode=post&f=11

    In the meantime, I believe the only alternative is to save the data to a server.

    All the best,
    Joel
     
  18. itfcjim

    itfcjim

    Joined:
    Mar 3, 2014
    Posts:
    5
    Cheers Joel - we'll probably just stick to an online save for our WebGL build for now then, have voted on your suggestion - will do the same on your forums once my activation email arrives :)

    Keep up the good work
    Cheers
     
  19. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    With ES2Reader, is there a read until EOF type loop that iterates over an entry at a time? I'm not seeing a way to do that.
     
  20. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Hi Steve,

    There's some undocumented methods which can achieve this. Note that reader.Next(), reader.currentTag.tag and reader.ReadObject() will not appear in code completion, but are publicly accessible.

    Code (CSharp):
    1. // This will get the contents of a file as a Dictionary.
    2. var file = new Dictionary<string, object>();
    3.  
    4. using(var reader = ES3Reader.Create("myFile.txt"))
    5. {
    6.     while(reader.Next())
    7.         file.Add(reader.currentTag.tag, reader.ReadObject());
    8. }
    All the best,
    Joel
     
  21. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Exactly what I need. Thanks!!!
     
  22. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    Anyone knows how to solve the "Too many open files" IOException?

    Code (CSharp):
    1. System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options)
    2. System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    3. System.IO.File.OpenRead (System.String path)
    4. System.IO.File.ReadAllBytes (System.String path)
    5. ES2FileUtility.ReadAllBytes (System.String path)
    6. ES2FileStream.CreateReadStream ()
    7. ES2FileStream..ctor (.ES2Settings settings, Operation operation)
    8. ES2Stream.Create (.ES2Settings settings, Operation operation)
    9. ES2Reader..ctor (.ES2Settings settings)
    10. ES2Reader.Create (.ES2Settings settings)
    11. ES2File.Exists (.ES2Settings settings)
    12. ES2.Exists (System.String identifier)
     
  23. cagezero

    cagezero

    Joined:
    May 8, 2012
    Posts:
    20
    Hey Joel. Thanks for the wonderful asset! I am hoping you can provide a little more detail about using ES2 in a background thread.


    I am aware of the limits of using threads in Unity, but I have not successfully used any of the load functions without triggering Unity's thread warnings. Do you have a list of thread safe ES2 functions? How are people successfully using your asset in background threads?

    Thanks.
     
  24. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Apologies for the late reply, I didn't receive a notification from Unity that there were new posts in this thread.

    I've not seen this error before. Would you be able to provide me with some code which replicates the error?

    You might also want to try updating Easy Save if you haven't done so already, as we've changed how we handle streams in a later version to reflect changes at Unity's end.

    All the best,
    Joel
     
  25. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    As above, apologies for the late reply, I didn't receive any notifications from Unity regarding new posts in this thread.

    I would assume that people attempting to use Easy Save in a different thread ignore the warnings. I've not found any way of suppressing the warnings at my end, but there didn't seem to be any harm in them being thrown.

    All the best,
    Joel
     
  26. Nyankoooo

    Nyankoooo

    Joined:
    May 21, 2016
    Posts:
    144
    Thank you for your reply!

    We're on the latest version that is available in the Asset Store and sadly, we don't know where this exception is thrown, as we only saw this in Unity's Game Performance reporting.
     
  27. JoelAtMoodkie

    JoelAtMoodkie

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

    It's difficult for us to be able to debug the error without being able to replicate it, especially as we have had no other reports of this error.

    It looks like the exception is happening on an ES2.Exists line. If you PM me a link to your scripts containing your save/load code I'll see if I can find anything that is wrong.

    The only situation I can think of where an error like this would occur is if calling ES2.Exists when you have an open or undisposed ES2Reader, or another plugin is accessing that file. This might also possibly happen if you're trying to use Easy Save on the same file in two separate threads.

    All the best,
    Joel
     
  28. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    @MardukCorp Thanks for sending over your code. I wasn't able to replicate the error with your code, but because your code only uses the basic ES2 methods there should be no issues unless you're trying to call them in separate threads.

    However, I've found more information regarding this error.

    Most platforms have a limit on how many files can be open at a given time, for some the limit is lower than others. When it hits this limit, the error you received will be thrown. When using the ES2.* methods, a maximum of one file will be opened by Easy Save, and this is always disposed of before the ES2 method finishes executing as it's created in a using block.

    It is likely that other parts of your code or plugins you are using are also opening files, and presumably not immediately disposing of them (or keeping the FileStream open), causing the limit to be hit. You might want to use the profiler to see if you can work out what is creating multiple files by seeing if any memory is being leaked.

    I've tested your code by calling the methods repeatedly, and I can confirm that the FileStreams are always disposed in the Profiler.

    All the best,
    Joel
     
  29. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Easy Save 3 Beta now available to existing users using Unity 5.5 or above.

    For more information, see the Easy Save 3 Beta Notes here.

    - Joel
     
  30. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    Hi joel. It is an awesome asset!
    I have been using this stable asset for a long time.
    Excuse me? by the way does Easy save have a callback delegate?
    for example, i'd like to call a callback function after game save finished.
    Thanks in advance!
     
  31. JoelAtMoodkie

    JoelAtMoodkie

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

    Easy Save stores data synchronously (unless used in a separate thread of course), so a callback isn't required. As soon as the function returns, the data is saved.

    All the best,
    Joel
     
  32. arcdragon1

    arcdragon1

    Joined:
    Oct 15, 2012
    Posts:
    116
    Wow, sounds good!
    Many thanks to you!
     
  33. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
  34. Nova2311

    Nova2311

    Joined:
    Apr 8, 2014
    Posts:
    4
    Hi, was wondering how i would go about saving and loading a list of a class. Class has ints and a couple of bools
     
  35. JoelAtMoodkie

    JoelAtMoodkie

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

    Simply add support for your type in the Assets > Easy Save 2 > Manage Types window, and then you can save and load it like any other array. i.e.

    Code (CSharp):
    1. ES2.Save( myClassList, "myFile.txt?tag=myClassList" );
    2. myClassList = ES2.LoadList<MyClass>("myFile.txt?tag=myClassList");
    Or in Easy Save 3 it is supported natively, so you can simply use the following code out of the box:

    Code (CSharp):
    1. ES3.Save< List<MyClass> >("myClassList", myClassList);
    2. myClassList = ES3.Load< List<MyClass> >("myClassList");
    All the best,
    Joel
     
  36. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Hi,

    I just wrote you an e-mail, but I figured I might as well just ask here in the forums.

    Basically, I want to know more about saving/loading gameobjects and their states.

    You can read my original question on Reddit here.

    We have a trigger system that our level designers use. It basically stores references to some trigger colliders and some transforms that need to move/rotate/etc. E.g., clicking on a button will make a lamp rotate. One object might look like the image below:



    With Easy Save, will we be able to just drag a "save me" component on this gameobjects and their states will automatically be saved/loaded? How difficult will it be to use?
     
  37. JoelAtMoodkie

    JoelAtMoodkie

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

    I've pasted my response to your email below:

    It is indeed possible to save GameObjects. In Easy Save 2, you would add support for the Components attached to your GameObjects (see http://docs.moodkie.com/easy-save-2/guides/adding-support-for-other-types/).
    You can then add the ES2Type from the second post in this thread into your project, which will allow you to save all supported Components on a GameObject:
    http://www.moodkie.com/forum/viewtopic.php?f=5&t=1023&p=3319
    We also have guides to saving and loading instantiated prefabs here if that’s relevant to you:
    http://moodkie.com/forum/viewtopic.php?f=4&t=482
    http://moodkie.com/forum/viewtopic.php?f=4&t=522

    Also as an additional note, Easy Save 3 has built-in support for saving and loading GameObjects, and is currently available as a beta.

    All the best,
    Joel
     
  38. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Cool, thanks. If I buy Easy Save today, will I get 2 and 3? Are there any significant differences between adding the ES2Type manually (as stated in the other post) or using the built-in functionality of 3 (I know it's in beta)?
     
  39. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    Buying Easy Save entitles you to all future updates, including Easy Save 3.

    Major differences between Easy Save 2 and 3 is that Easy Save 3 when saving GameObjects is that Easy Save 3 can save references. You also will not need to manually add support for each Component on the GameObject you want to save (though this open is still available if required).

    For more information on what Easy Save 3 will automatically serialise, see the Supported Types guide.

    All the best,
    Joel
     
  40. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Thanks!

    Another question about how to create unique key IDs:

    In all of the examples I've read, you save/load data via a string. For example:

    Code (CSharp):
    1. // Save the position of this GameObject.
    2. ES3.Save<Vector3>("myPosition", transform.position, "myFile.txt");
    3.  
    4. // Load the position we saved and assign it to this GameObject.
    5. transform.position = ES3.Load<Vector3>("myFile.txt?tag=myPosition");
    Having to name the files with a unique ID each time seems cumbersome. What if I have a lever that turns on/off 100 spotlights and I want to store their on/off state?

    Code (CSharp):
    1. List<GameObject> Lights;
    2. void Start()
    3. {
    4.     Lights = new List<GameObject>();
    5.     Lights.add(new GameObject("Light_1"));
    6.     Lights.add(new GameObject("Light_2"));
    7.     Lights.add(new GameObject("Light_3"));
    8.     Lights.add(new GameObject("Light_1")); // <--- duplicated name/ID
    9.  
    10. }
    11.  
    12. // save the lights
    13. foreach (var go in Lights)
    14. {
    15.     // Save a GameObject.
    16.     ES3.Save<GameObject>(go, go.name); // <-- What filepath should I use? And can I save multiple objects to the same file? Is the first parameter a key or a value?
    17. }
    18.  
    19. // load the lights
    20. foreach (var go in Lights)
    21. {
    22.     // Load a GameObject, automatically assigning it to an existing
    23.     // GameObject if one exists, or create a new GameObject if not.
    24.     GameObject temp = ES3.Load<GameObject>(go.name);
    25.  
    26.     if (temp != null)
    27.         go.SetActive(temp.activeSelf);
    28. }
    29.  
    In the example above, what happens if I have gameobjects with the same names? Do you want us to use GetInstanceID() or something similar?

    Is there a way to automatically generate a unique key ID for a given gameobject or component?

    Also, I am not sure I completely understands how the tag system works. For the example above, I do not want to have 100 text files to store each of the lights' on/off state. How should I do this?
     
    Last edited: Jun 26, 2017
  41. JoelAtMoodkie

    JoelAtMoodkie

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

    Easy Save 2 Tags are explained in this guide: http://docs.moodkie.com/easy-save-2/guides/tags-saving-multiple-variables-to-one-file/

    Easy Save 3 uses keys, which are basically the same thing except you specify it as a separate parameter. i.e. this example will save two keys to a single file.

    Code (CSharp):
    1. ES3.Save<int>("myKey1", value1, "myFile.json" );
    2. ES3.Save<int>("myKey2", value2, "myFile.json" );
    In your example, you can simply save the List of Lights rather than having to worry about giving each GameObject a different name. And then use self-assigning load to load them back. I.e.

    Code (CSharp):
    1. ES3.Save<List<GameObject>>("Lights", Lights);
    2. // Self-assigning Load
    3. ES3.Load<List<GameObject>>("Lights", Lights);
    Also note that you seem to be using a mix of ES2 and ES3 code. You'll want to make sure you're using either the Easy Save 2 or Easy Save 3 API, not both, as they're not compatible with each other.

    All the best,
    Joel
     
  42. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Yeah, you are right; I was using a little bit of both (I haven't bought the asset yet, so just looking at the docs).

    It makes sense to save the list of the lights ... but do I manually have to create and take care of the key string? I mean, what if I (or, say, our level designers) decide to have a different list of lights that is named the same thing? Is it just up to me to logistically make it so that I don't create duplicated names? There is no safe-guard?

    Again, thanks a lot for your super quick answers. They are much appreciated!
     
  43. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    It would indeed be up to you to make sure you don't create duplicated keys, because there would be no way for the application to know what constitutes an undesired overwrite.

    If it's important, you can simply add a field to your MonoBehaviour which automatically generates a random GUID for that specific Component, which you can append to your key name. i.e.

    Code (CSharp):
    1. public string guid = GetGUID();
    2.  
    3. private static string GetGUID()
    4. {
    5.     return System.Guid.NewGuid().ToString();
    6. }
    All the best,
    Joel
     
  44. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Alright, thanks. Just bought the plugin now and trying ES3 out :)

    I noticed that our scenes seem to be quite slow (editor hangs). I think it's because of the Easy Save Manager 3, which is automatically added upon opening a scene. We have a lot of gameobjects, so it might be the list that is simply too large to show in the Inspector?

    Do I need it? Is it just for auto-saving?

    I also tried disabling "Auto Add Manager to Scene", but it keeps enabling itself.
     
    Last edited: Jun 26, 2017
  45. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    The Auto Save Manager is required as it's what enabled saving/loading of references.

    Having the list expanded in the inspector might indeed be slow if you've got a lot of references in the list. However, if you collapse the list this should speed things up again. The list is only their for debugging purposes so you shouldn't need to expand it in normal circumstances.

    With regards to the Auto Add Manager to Scene setting not applying, this appears to be a editor serialisation error. We'll work around this in the next update.

    All the best,
    Joel
     
  46. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Hm, I haven't even expanded the list, but Unity is still super unresponsive when creating the Easy Save 3 Manager (it takes about 10+ seconds to respond when I click on anything in the hierarchy, inspector, etc.).

    I even tried to comment out OnInspectorGUI() in ES3ReferenceMgrEditor, but it didn't work.

    I think I know what the problem is: It seems like the manager is constantly generating a new key ID for a non-existing gameobject. I just tried going into one of our scenes and deleting everything except the manager. Clicking refresh didn't update the list. As you can see in the GIF below, it is constantly generating a string.



    Something seems not quite right :\

    Does it really need to store references of everything in the scene (including fonts, shaders and whatnot), even though we only want to save/load a few specific objects?
     
  47. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    912
    I don't appear to be getting the same behaviour at my end. Would you be able to send me a test project and instructions which replicates this? Uploading it to something like Dropbox or WeTransfer and sending over a link will be the best way.

    Also it's not possible to know what needs to be saved prior to runtime, so it's necessary to save references to all UnityEngine.Objects in the scene. However, this is only stored as a Dictionary so will have no effect on performance. The performance issue will almost definitely be due to the bug causing your reference list to reset every frame.

    All the best,
    Joel
     
  48. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    Thanks, again, again.

    I figured out that the "None (object)" being generated was due to another plugin called ShuaConsole. More specifically, I think the culprit might be ShuaConsole.cs, which we are using on a global Canvas Manager prefab in all of our scenes.

    After I deleted ShuaConsole, everything seems to be fine again. The tricky part to debug this was that if I make ANY change in the scene, the Easy Save 3 Manager is automatically added (making Unity unresponsive). Even if I managed to delete the ShuaConsole, Unity would remain unresponsive (due to memory leak, perhaps?). I then managed to save the scene, restart Unity, and now things work again.

    It was difficult to track this "bug" down, since I initially thought it was due to our scenes being quite populated with geometry. But when I noticed that even simple scenes made Unity unresponsive, I decided to manually delete gameobjects and see if that made a difference. In the end, the answer came down to our Canvas gameobject with the ShuaConsole script.

    Speaking of the Easy Saver 3 Manager and its reference list: will it be a problem when we additively load/stream in new scenes at run-time (using SECTR)? Will it automatically update its reference list accordingly?

    UPDATE: After fooling a bit more around, it seems like Unity will always get unresponsive the first time that the manager is added. After saving the scene and restarting, Unity appears to be responsive again.
     
    Last edited: Jun 26, 2017
  49. JoelAtMoodkie

    JoelAtMoodkie

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

    Would you be able to send me a project which I can use to reproduce this? I still don't appear to reproduce it at my end.

    The Easy Save 3 beta doesn't currently handle references when scenes are being loaded additively, but support for this will be added at a later date. I wouldn't be able to comment on SECTR in particular as we have no experience with it. Presumably however it will work the same way.

    All the best,
    Joel
     
  50. Wikzo-DK

    Wikzo-DK

    Joined:
    Sep 6, 2012
    Posts:
    83
    It's a bit difficult, since we have a lot of other plugins, big 3D assets, etc.

    If ES3 doesn't support additive loading right now, I don't think we can use it, since our game runs via SECTR (which basically is streaming in scenes at run-time). How does ES2 handle this?