Page 1 of 1

Saving Type Texture3D

Posted: Sun Jun 26, 2022 2:29 pm
by Eravex
I've been using ES3 for a while, and i love it. But I've ran into an issue with saving A Texture 3d. I went and added a new Type for it, but i Get Texture3D doesn't not contain a constructor that takes 0 arguments.

the error is being triggered here

protected override object ReadObject<T>(ES3Reader reader)
{
var instance = new UnityEngine.Texture3D(); <--------------------------------
ReadObject<T>(reader, instance);
return instance;
}

I'm not sure what magic words id need to say to get it to play nicely. Any help would be appreciated.

Re: Saving Type Texture3D

Posted: Mon Jun 27, 2022 10:34 am
by Joel
Hi there, and thanks for getting in contact.

As the error suggests, it's constructor requires parameters. You can find the required parameters in Unity's documentation for Texture3D:

https://docs.unity3d.com/ScriptReferenc ... -ctor.html

I recommend taking a look at the ES3Type for Texture2D to see how an ES3Type for a similar class works. This is located in Plugins/Easy Save 3/Scripts/Types/Unity Types/ES3Type_Texture2D.cs.

All the best,
Joel