Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Easy Save - The Complete Save & Load Asset for Unity

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

  1. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    865
    Thanks for the response Joel. Indeed, I thought perhaps that would be the best way to go about it, but just wanted to make sure there wasn't another more performant method we might be overlooking. But, having looked at the source code and the documentation for BinaryReader, I can see that there really is no way to implement a skip method. Which is fine, Read<T> will work just fine.

    Thanks (and great produce),
    Kyle Gillen
     
  2. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Got latest tonight and now have this bug that stops me from loading values:
    CryptographicException: Invalid input block size.
    Mono.Security.Cryptography.SymmetricTransform.FinalDecrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs:462)
    Mono.Security.Cryptography.SymmetricTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/Mono.Security.Cryptography/SymmetricTransform.cs:554)
    System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Security.Cryptography/RijndaelManagedTransform.cs:94)
    System.Security.Cryptography.CryptoStream.FlushFinalBlock () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs:341)
    System.Security.Cryptography.CryptoStream.Close () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs:123)
    System.IO.Stream.Dispose () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Stream.cs:98)
    (wrapper remoting-invoke-with-check) System.IO.Stream:Dispose ()
    MoodkieSecurity.AESEncryptor.iDecrypt (System.Byte[] data, System.Byte[] key, System.Byte[] iv)
    MoodkieSecurity.AESEncryptor.Decrypt (System.Byte[] data)
    ES2Reader.GetDecryptedBytes ()
    ES2Reader.GetEncryptedReader ()
    ES2Reader.ReadEncrypted[Int32] (.ES2Type type)
    ES2Reader.Read[Int32] (.ES2Type es2type)
    ES2Reader.Read[Int32] (System.String tag)
    ES2.Load[Int32] (System.String identifier)
    StartLevel.Awake () (at Assets/_Scripts/StartLevel.cs:115)
     
  3. JoelAtMoodkie

    JoelAtMoodkie

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

    Earlier versions of Easy Save used a different encryption method to account for changes at Unity's end. However, you can enable backwards compatibility using the file in this thread.

    All the best,
    Joel
     
  4. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Thanks will check this out.

    BTW, you say "You can tell if your older version of Easy Save is affected by this because it will use Elixis.dll in the Assets/Plugins folder, instead of MoodkieSecurity.dll." I checked my Plugin folder and I have MoodkieSecurity.dll in there. So bit confused why it's not working still.
     
  5. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    @joeltebbett reinstalled ES2 and also installed the .dll from above. Still getting :

    Also note that after installation (from Asset Store) this came up (if it means anything):

    And...
     
  6. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Sorry for the spam on this thread. So, I uninstalled the latest ES2 and installed an old one from a project 2 months ago (think it's ver 2.6.8 looking at the change log file). This has FIXED the above issue.


    So looks like the issue is with either ES2 itself (latest) or to do with downloading the package off the asset store.

    Thanks
     
  7. JoelAtMoodkie

    JoelAtMoodkie

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

    The only other reason for the Invalid Block Size error to be thrown is if the incorrect password is provided, or if you're using one of the versions of Unity 5.0, 5.1 or 4.6 which contained a BinaryWriter bug at Unity's end.

    2.6.8 is the current version, and we've not released an update for over two months (as we're soon releasing a major update), so it seems unlikely that it's to do with any differences in packages as it would appear you've been using the latest version anyway.

    I've just ran some tests of the encryption at my end on 5.3 and am not receiving any errors, nor did I receive any when updating client projects using Easy Save to Unity 5.3. Would you be able to let me know the exact version of Unity you are using, and which platform you are building for, so I can try to replicate the bug?

    Just to clarify, the TargetInvocationExceptions are due to a bug at Unity's end, but do not actually affect anything.

    All the best,
    Joel
     
  8. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Hi Joel
    I'm using Unity 5.3.1f1 Personal for Mac
    Platform: Windows/OSx

    I've reinstalled Unity to see if that helped, but no change. I'll stick with the older version of ES2 for now until I find a solution.

    Cheers
     
  9. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    By "Older version" I mean the one I copied from a backup of the project from a few weeks ago... Which gets me thinking it could have something to do with the asset store bundle perhaps?
     
  10. JoelAtMoodkie

    JoelAtMoodkie

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

    I've just tried it on the version of Unity you speak of and I'm still not encountering any problems. I also tried creating an encrypted file from 2.6.8 and then access it using 2.6.8p2, but encountered no problems.

    If it was an issue with the package then I believe it would have affected other users too, but we've not had anyone else with the same issue. However, if put your Assets/Easy Save 2 and Assets/Plugins folder into a UnityPackage and email it to us at moodkie.com/contact, I'll test it with your exact version. If you could also send me your Unity invoice number I will check with the Asset Store that you're being sent the correct version.

    Finally, have you changed any Default Settings? The only other possibility I can think of is that the default settings are being overwritten whenever you update Easy Save.

    All the best,
    Joel
     
    Last edited: Jun 1, 2017
  11. pixpusher2

    pixpusher2

    Joined:
    Oct 30, 2013
    Posts:
    121
    Hi there,

    How do I go about using the encryption setting in ES2?
    I've tried both checking the Encrypt Data under the Editor Settings as well as adding the parameter as shown on the docs, but none of them works? Combination of ES2.SaveRaw(), ES2.Save(), AES128, Obfuscate, etc all produces the same file without encryption.

    I'm using Windows Unity 5.3.0f1 and the latest ES2 from Asset store. Thanks

    Edit: I've mailed over the ES2 version I'm using along with invoice number if that helps.
     
    Last edited: Dec 26, 2015
  12. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    506
    Will do. Pretty busy with Xmas stuff / holidays atm but will get this to you. I'll have to search my email for the invoice number - bought it ages ago.

    Cheers
     
  13. JoelAtMoodkie

    JoelAtMoodkie

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

    Please could you show me the code you’re using at the moment so I can help guide you?

    Also note that the actual tag names are not encrypted, only the data relating to those tags, and encryption does not currently apply to ES2.SaveRaw as it requires tagged data. However, if you would like to use encryption with ES2.SaveRaw, let me know and I’ll provide you with an alternative solution.

    All the best,
    Joel
     
  14. pixpusher2

    pixpusher2

    Joined:
    Oct 30, 2013
    Posts:
    121
    A bit late, but popping in just to say my issue was resolved through email. Cheers
     
  15. wQazi

    wQazi

    Joined:
    Feb 5, 2015
    Posts:
    12
    Does EasySave support Windows 10 Universal Windows App (UWA) in Unity 5?

    I've had a nightmare trying to get anything with IO and encryption compiling in a Windows UWA.
     
  16. JoelAtMoodkie

    JoelAtMoodkie

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

    Support for UWA is coming in the next update. However, if you send me your invoice number at moodkie.com/contact, I'd be happy to send you an advance copy of this.

    All the best,
    Joel
     
    Last edited: Jun 1, 2017
  17. wQazi

    wQazi

    Joined:
    Feb 5, 2015
    Posts:
    12
    Awesome! Thanks! I was going to buy it based on support for UWA, so I'll do that now!
     
  18. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    582
    Hi Joel,

    Would it be possible to get Playmaker actions that support the new Array variables in Playmaker 1.8?

    Thanks,
    Mark
     
  19. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    566
    Hi Mark,

    We're waiting for Playmaker 1.8 to come out of beta before adding support, otherwise we spend more time patching around bugs than necessary!

    All the best,
    Joel
     
  20. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    582
    Thanks for the reply! All good, look forward to it! :)
     
  21. kurismakku

    kurismakku

    Joined:
    Sep 18, 2013
    Posts:
    39
    I am wondering is there a way that the load method loads the data without defining the type, because I have a system where it is not known what is gonna be the type of the saved data ? Thanks.
     
  22. JoelAtMoodkie

    JoelAtMoodkie

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

    ES2.LoadObject is what you're looking for.

    All the best,
    Joel
     
  23. Qneuroindia

    Qneuroindia

    Joined:
    Nov 13, 2014
    Posts:
    4
    Hi,

    We are developing a game where we are collecting data from an external device via bluetooth on ipad. For now the communication between the external device and ipad is up and we are able to get the data we need. But, we need to store that data in csv format and later push it to our web server. Could you tell me if we can save to csv using your plugin.

    Thanks,
    Sam
     
  24. JoelAtMoodkie

    JoelAtMoodkie

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

    This is indeed possible. Take a look at this guide for more information.

    All the best,
    Joel
     
  25. Qneuroindia

    Qneuroindia

    Joined:
    Nov 13, 2014
    Posts:
    4
    That was quick.. Thanks..

    Also in the link you gave, it says, saving multiple worksheets is not possible for now. Has that been fixed or yet to be done..

    Edit: Can it save multiple sheets in a single file or one sheet in multiple files?


    Thanks.
     
    Last edited: Jan 28, 2016
  26. JoelAtMoodkie

    JoelAtMoodkie

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

    As it saves to CSV, there's no way to save multiple worksheets as the CSV format has no way to do so. If you need to create multiple worksheets from CSV files, you would need to save multiple files, then in Excel create multiple worksheets and then import each file into each worksheet.

    All the best,
    Joel
     
  27. IOZO

    IOZO

    Joined:
    Jun 26, 2010
    Posts:
    55
    Hi ,

    I've got this error with Unity 5.3.


    NullReferenceException: Object reference not set to an instance of an objectUnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])
    UnityEditor.UI.ImageEditor.OnDisable () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEditor.UI/UI/ImageEditor.cs:66)
    UnityEditor.AssetDatabase:DeleteAsset(String)
    ES2EditorStartup:Cleanup()
    ES2EditorStartup:.cctor()

    I updated ES2 to the latest version.
    What could be wrong ?

    thanks.
     
  28. JoelAtMoodkie

    JoelAtMoodkie

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

    This is actually a bug caused at Unity's end, but is completely harmless, and will only happen in the Editor. We've issued a work around in the upcoming update anyway, just so it doesn't cause any confusion.

    All the best,
    Joel
     
  29. MikeEnoch

    MikeEnoch

    Joined:
    May 31, 2014
    Posts:
    6
    I'm getting these two errors immediately on importing Easy Save 2 (v2.6.8 according to the change log file) from the asset store (just bought today) into a fresh project (Unity 5.3.1f1):

    --- Error 1 ---

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
    at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Mono.Cecil.TypeReference.Resolve () [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementForProperty (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementFor (Mono.Cecil.MethodReference methodReference) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.Visit (Mono.Cecil.MethodReference methodReference, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.Instruction instruction, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.MethodBody methodBody, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.ModuleDefinition moduleDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.DoAccept[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition definition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.AssemblyUpdaterStepBase.Apply (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Core.AssemblyUpdaterPipeline.RunUpdateRound (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Core.AssemblyUpdaterPipeline.Run (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
    UnityEditor.Scripting.APIUpdaterHelper:DoesAssemblyRequireUpgrade(String)

    --- Error 2 ---

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0
    at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
    at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in <filename unknown>:0
    at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in <filename unknown>:0
    at Mono.Cecil.TypeReference.Resolve () [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementForProperty (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementFor (Mono.Cecil.MethodReference methodReference) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.Visit (Mono.Cecil.MethodReference methodReference, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.Instruction instruction, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.MethodBody methodBody, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.ModuleDefinition moduleDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.DoAccept[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition definition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.AssemblyUpdaterStepBase.Apply (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Core.AssemblyUpdaterPipeline.RunUpdateRound (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Core.AssemblyUpdaterPipeline.Run (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
    UnityEditor.Scripting.APIUpdaterHelper:DoesAssemblyRequireUpgrade(String)

    ---

    Anything I should be worried about? I'm on a Mac, so the first error mentioning Windows seems like an obvious cause, but does this mean something's not going to work due to it getting my platform wrong?
     
  30. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    566
  31. thegdeveloper

    thegdeveloper

    Joined:
    Feb 25, 2013
    Posts:
    134
    I am using the plugin for a windows 8.1 phone project with unity 5.2.1 and visual studio 2015. When I import the plugin I get the error

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementForProperty (Mono.Cecil.MethodReference method) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.MemberReferenceReplacementFor (Mono.Cecil.MethodReference methodReference) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.MemberReferenceReplacer.Visit (Mono.Cecil.MethodReference methodReference, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.Instruction instruction, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.Cil.MethodBody methodBody, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.MethodDefinition methodDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.ModuleDefinition moduleDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Visitor.Visit[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, Unity.Cecil.Visitor.Context context) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.DoAccept[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition definition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at Unity.Cecil.Visitor.Extensions.Accept (Mono.Cecil.AssemblyDefinition assemblyDefinition, Unity.Cecil.Visitor.Visitor visitor) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Steps.AssemblyUpdaterStepBase.Apply (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Core.AssemblyUpdaterPipeline.Run (AssemblyUpdater.Core.AssemblyUpdaterContext context) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.CheckForObsoleteAPIUsage (AssemblyUpdater.Application.CommandLineSpec config) [0x00000] in <filename unknown>:0
    at AssemblyUpdater.Application.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
    UnityEditor.Scripting.APIUpdaterHelper:DoesAssemblyRequireUpgrade(String)


    but the real issue is when I build the visual studio project and try run the project I get the following exception
    WinRT information: System.TypeInitializationException: The type initializer for 'WinRTBridge.WinRTBridge' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRTBridge.TypeInformation' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'ES2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The bound assembly has a version that is lower than that of the request. (Exception from HRESULT: 0x80132000)

    What can I do to fix all these?
     
    Last edited: Feb 25, 2016
  32. ikazrima

    ikazrima

    Joined:
    Feb 11, 2014
    Posts:
    301
    Hi there,
    I noticed that I can write to spreadsheets, how about loading from them? Do I have to write my own solution for reading Excel / Google Sheets?
     
  33. JoelAtMoodkie

    JoelAtMoodkie

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

    This is a known issue which is fixed in the next version (which is currently awaiting approval from Unity). In the meantime, if you PM me your invoice number and email address, I'll email you a patch.

    All the best,
    Joel
     
    thegdeveloper likes this.
  34. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    566
    Currently this is not possible, but there's a Feature Request HERE which you can vote on to get this feature added.

    All the best,
    Joel
     
    thegdeveloper likes this.
  35. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Hello I have a pause menu UI and have two buttons : Save and load . I "Easy Save" and I would like when I click on the button " save " his backup and as for my "loading" buttons to its load . Thank you
     
  36. JoelAtMoodkie

    JoelAtMoodkie

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

    If you're using Unity 5 UI buttons, you simply need to attach a script with a Save and Load method, each containing your save and load code (see the Guides if you require more information on writing Save and Load code), and then hook up your buttons to these methods (as explained in Unity's UI Button tutorial), and voila!

    If you're using the old GUI buttons, you simply need to put your Save/Load code within the button's braces. i.e.

    Code (CSharp):
    1. if (GUI.Button(new Rect(10, 10, 50, 50), "Save"))
    2. {
    3.     // Your Save code here.
    4.     ES2.Save(myVariable, "myTag");
    5. }
    6.        
    7. if (GUI.Button(new Rect(10, 70, 50, 30), "Load"))
    8. {
    9.     // Your Load code here.
    10.     if(ES2.Exists("myTag"))
    11.         myVariable = ES2.Load<MyVariable>("myTag");
    12. }
    All the best,
    Joel
     
  37. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Thank you , but I have already attach the save / load on my UI buttons but its not working when I click "save" and then "load" is missing a step I have not done for his work?
     
  38. JoelAtMoodkie

    JoelAtMoodkie

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

    Firstly, try putting a Debug.Log statement in your Save and Load methods to check that the methods are actually being called by your buttons.

    If they are being called correctly, I will need to see your code to see where you're going wrong.

    All the best,
    Joel
     
  39. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    48
    Any love for people using LinkedList? How would I go about serializing that? It's not in the supported types list.
     
  40. JoelAtMoodkie

    JoelAtMoodkie

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

    We've not actually had anyone request support for LinkedList before, but I've added a poll to our Feature Requests forum where you can vote for it to be added. It shouldn't be difficult to add as it's nearly identical to List.

    In the meantime, you can convert your LinkedList to and from a List and store that instead. i.e.

    Code (CSharp):
    1. LinkedList<string> linkedList = GetLinkedList();
    2. // Save
    3. ES2.Save( new List<string>(linkedList), "myLinkedList" );
    4. // Load
    5. linkedList = new LinkedList<string>( ES2.LoadList<string>( "myLinkedList" ) );
    All the best,
    Joel
     
    Ultroman likes this.
  41. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,052
    Hello Joel and everyone else,

    I have just uploaded an integration package for EasySave and NodeCanvas, which you can download here.
    Integration package with FlowCanvas is also comming very soon :)
    Joel, if you think any improvements can be made, by all means do let me know!

    Cheers!
     
    hopeful and JoelAtMoodkie like this.
  42. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    566
    That's brilliant, I'm sure this is going to be very useful to a lot of people! Once I get a chance to dig into NodeCanvas, I'll see if there's any optimisations I can make.

    All the best,
    Joel
     
    nuverian likes this.
  43. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,052
    Hey,
    I believe so as well. Easy Save is a great asset!

    Best regards,
    Gavalakis Vaggelis
     
    JoelAtMoodkie likes this.
  44. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Hello , how to make a backup system like " gta san andreas " , that is to say a disk and when the player passes through this disc, his backup, is it possible? if yes how?
     
  45. JoelAtMoodkie

    JoelAtMoodkie

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

    You just need to create an object with a trigger Collider attached, and then attach a script to this which uses the OnTriggerEnter() event to save your data. Something along the lines of:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class SaveOnTriggerEnter() : MonoBehaviour
    4. {
    5.     public void OnTriggerEnter()
    6.     {
    7.         // Put your ES2.Save calls here.
    8.     }
    9. }
    For information on writing the Easy Save code, take a look at our guides here.

    All the best,
    Joel
     
  46. Ludo97

    Ludo97

    Joined:
    Dec 9, 2015
    Posts:
    121
    Thank you but if I want reloaded after this backup by my main menu , it's possible please ?
     
  47. JoelAtMoodkie

    JoelAtMoodkie

    Joined:
    Oct 18, 2009
    Posts:
    566
    Sure is. You'd just need to create a button which makes ES2.Load calls to load your data. You can use ES2.Exists to check if there's save data to load.

    i.e.

    Code (CSharp):
    1. if(!ES2.Exists("myFile.txt"))
    2.     return;
    3.  
    4. if (GUI.Button(new Rect(10, 70, 50, 30), "Load"))
    5. {
    6.     // Your ES2.Load calls here.
    7. }
    Writing the ES2.Load code is also covered in the guide I linked earlier.

    All the best,
    Joel
     
  48. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    Hi i bought the plugin long while ago but never needed to use it so far because my use case is to save the entire scene and that seemed really complicated as hell.

    But now im interested in making simpler game where most of the current level info would be stored in 1 Game Manager gameobject in the hierarchy during gameplay.

    This gameobject would contain only the transform component and several script components.

    What's the best approach for saving this object?
    thanks :)
     
  49. JoelAtMoodkie

    JoelAtMoodkie

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

    Assuming you've assigned your Transform and script components to fields in your GameManager, you could do something like this:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class GameManager : MonoBehaviour
    5. {
    6.     public Transform myTransform;
    7.     public Script1 script1;
    8.     public Script2 script2;
    9.  
    10.     void Start ()
    11.     {
    12.         // If there's a save file to load, load it.
    13.         if(ES2.Exists("myFile.txt"))
    14.         {
    15.             // Use self-assigning Load to load the data back into our Components.
    16.             ES2.Load<Transform>  ("myFile.txt?tag=myTransform",     myTransform);
    17.             ES2.Load<Script1>    ("myFile.txt?tag=script1",         script1);
    18.             ES2.Load<Script2>    ("myFile.txt?tag=script2",         script2);
    19.         }
    20.     }
    21.  
    22.     // Called when the application quits.
    23.     // If you want to save when the level changes, use OnDestroy instead.
    24.     void OnApplicationQuit()
    25.     {
    26.         ES2.Save(myTransform,     "myFile.txt?tag=myTransform");
    27.         ES2.Save(script1,         "myFile.txt?tag=script1");
    28.         ES2.Save(script2,         "myFile.txt?tag=script2");
    29.     }
    30. }
    This will load the data when the level loads, and save it when the application quits. It's worth reading the notes on Unity's OnApplicationQuit page if you intend on targeting mobile devices.

    The example uses Tags to save multiple pieces of data to one file.

    All the best,
    Joel
     
    luniac likes this.
  50. luniac

    luniac

    Joined:
    Jan 12, 2011
    Posts:
    511
    Hey thanks that's very simple!

    I thought there would be some extra work saving custom types like "Script1" and "Script2"
     
unityunity