I'm getting the following error when I want to save a simple List with int,bool,string:
NotSupportedException: ES3Type.type is null when trying to create an ES3Type for System.Collections.Generic.List`1[Skills], possibly because the element type is not supported.
ES3Internal.ES3TypeMgr.CreateES3Type (System.Type type, System.Boolean throwException) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3TypeMgr.cs:131)
ES3Internal.ES3TypeMgr.GetOrCreateES3Type (System.Type type, System.Boolean throwException) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3TypeMgr.cs:32)
ES3Writer.Write (System.Type type, System.String key, System.Object value) (at Assets/Plugins/Easy Save 3/Scripts/Writers/ES3Writer.cs:142)
ES3Writer.Write[T] (System.String key, System.Object value) (at Assets/Plugins/Easy Save 3/Scripts/Writers/ES3Writer.cs:129)
ES3.Save[T] (System.String key, T value, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:110)
ES3.Save[T] (System.String key, T value) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:71)
Stats.Save () (at Assets/Characters/Base/Stats.cs:291)
Character.Save () (at Assets/Characters/Base/Character.cs:150)
charactercreationSaverLoader.ExitCharacterCreationScreen () (at Assets/Scenes/CharacterCreator/charactercreationSaverLoader.cs:70)
UnityEngine.Events.InvokableCall.Invoke () (at <f1212ad1dec44ce7b7147976b91869c3>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <f1212ad1dec44ce7b7147976b91869c3>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
----------------------------------------------------------------
save code:
ES3.Save("skill_list", skills);
getting the following error when I want to save a simple List with int,bool,string:
Re: getting the following error when I want to save a simple List with int,bool,string:
Hi there,
I replied to your PM but have added the response below:
I replied to your PM but have added the response below:
Hi there,
This error will be because the 'Skills' class is not supported. In most cases this is because it hasn't got a parameterless constructor, so adding one will resolve the issue. I.e. adding this to your Skills class:
All the best,Code: Select all
public Skills(){ }
Joel