Hi, maybe I have the same problem.
I tried to save data as below code.
Code: Select all
if (ES3.KeyExists("MyData"))
{
object = ES3.Load<Dictionary<string, MyClass>>("MyData", new Dictionary<string, MyClass>());
}
public class MyClass
{
public DateTime time;
public int to;
public int price;
public MyClass(DateTime time, int to, int price)
{
this.time = time;
this.to = to;
this.price = price;
}
}
But the below error is shown.
Code: Select all
NotSupportedException: ES3Type.type is null when trying to create an ES3Type for System.Collections.Generic.Dictionary`2[System.String,UmeHistory], 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:109)
ES3Internal.ES3TypeMgr.GetOrCreateES3Type (System.Type type, System.Boolean throwException) (at Assets/Plugins/Easy Save 3/Scripts/Types/ES3TypeMgr.cs:23)
ES3Writer.Write[T] (System.String key, System.Object value) (at Assets/Plugins/Easy Save 3/Scripts/Writers/ES3Writer.cs:86)
ES3.Save[T] (System.String key, System.Object value) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:30)
DataManager.EasySave () (at Assets/Scripts/DataManager.cs:87)
KuraManager.AddMaterial (System.Int32 type) (at Assets/Scripts/KuraManager.cs:372)
UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:207)
UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:345)
UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:70)
UnityEngine.UI.Button.Press () (at C:/Program Files/Unity/Hub/Editor/2019.3.0a4/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:68)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/Program Files/Unity/Hub/Editor/2019.3.0a4/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/Button.cs:110)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/Program Files/Unity/Hub/Editor/2019.3.0a4/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at C:/Program Files/Unity/Hub/Editor/2019.3.0a4/Editor/Data/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()
Does it not be supported Dictionary including original defined Class?