I got this error, please help
ES3Type.type is null when trying to create an ES3Type for System.Collections.Generic.Dictionary`2[System.Int16,Music], possibly because the element type is not supported.
public static Dictionary<short, Music> musics = new Dictionary<short, Music>();
Dictionary "musics " already has data called by method:
public static void SaveCACHE_MP3(Dictionary<short, Music> musics , string ver)
{
try
{
//settings = new ES3Settings(ES3.Location.Cache);
ES3.Save<int>(ver + "mp3", Main.musics.Count);
ES3.Save<Dictionary<short, Music>>(ver, musics);
Debug.Log("SAVE LOG MP3 OK");
}
catch (Exception ex)
{
Debug.Log("SAVE LOG MP3 error: " + ex.Message);
}
}
Class:
public class Music
{
public short id;
public string name;
public string author;
public short bpm;
public short round;
public float[] start;//Bi?n này
public short end;
public short len;
public Music(short id, string name, string author, short bpm, short len)
{
this.id = id;
this.name = name;
this.author = author;
this.bpm = bpm;
this.len = len;
}
public Music(short id, string name, string author, short bpm, short round, float[] start, short end, short len)
{
this.id = id;
this.name = name;
this.author = author;
this.bpm = bpm;
this.round = round;
this.start = start;
this.end = end;
this.len = len;
}
}
I can't find the reason I need help, thanks!
ES3Type.type is null
Re: ES3Type.type is null
Hi there,
Your Music class is not supported because it doesn't have a parameterless constructor. Adding a parameterless constructor to it will resolve the issue.
For more information on what is supported please see the Supported Types guide:
https://docs.moodkie.com/easy-save-3/es ... ted-types/
All the best,
Joel
Your Music class is not supported because it doesn't have a parameterless constructor. Adding a parameterless constructor to it will resolve the issue.
For more information on what is supported please see the Supported Types guide:
https://docs.moodkie.com/easy-save-3/es ... ted-types/
All the best,
Joel