I'm using ES3 in my game and I absolutely love it, but I recently encountered a problem and I'm wondering if anyone here can help me out.
I have a custom class, which I save to and load from. I recently added a field of type byte[], and now when I try to load the saved file I receive an "Invalid cast" error. No error is generated when saving the file, but I can't 100% confirm that the save was successful without being able to load it again.
I can work around this problem by converting my byte[] field to List<byte>, but ideally I'd like to be able to a byte[] field directly.
Please note that I want to save this field as part of my custom class (I know there are other tools for saving byte[]s directly. I'm looking for some way to save it as part of a custom class).
Any thoughts?
Thanks!
Invalid cast on byte[] fields
Re: Invalid cast on byte[] fields
Hi there,
If you've created an ES3Type for your class, you should just need to go the Types pane, press Reset to Default, and then create the ES3Type again.
If you are not using an ES3Type, the change of type should be handled by default. If this is not the case, please could you create a new project which replicates it and Pm it to me?
All the best,
Joel
If you've created an ES3Type for your class, you should just need to go the Types pane, press Reset to Default, and then create the ES3Type again.
If you are not using an ES3Type, the change of type should be handled by default. If this is not the case, please could you create a new project which replicates it and Pm it to me?
All the best,
Joel