Saving Type Texture3D

Discussion and help for Easy Save 3
Post Reply
Eravex
Posts: 1
Joined: Sun Jun 26, 2022 2:22 pm

Saving Type Texture3D

Post 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.
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Saving Type Texture3D

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply