Serialize Texture3D

Hello everyone !

I am creating Texture3D using a script as described in the documentation and I assign it on a material.

For the moment the texture is not saved and each time I launch the Editor, I need to create the texture again, I think that it will be the same if I make a build.

I don’t think that calling the Texture3D create function on start is a good idea because of performance.

How can I serialize it ? Or maybe is it possible to create an asset with this Texture3D ?

Did you try AssetDatabase.CreateAsset? I’ve never tried to serialize a Texture3D object, but the method takes an object of type UnityEngine.Object so maybe it works.

I didn’t try this. But how could it be possible !
I’ll try and give you my feedback :slight_smile:

It works thank you very much ! I just save it as a .asset file.