I have had some difficulties with a scene not importing a texture correctly, and at some point the error just stopped without me doing anything. Then I looked at the .tscn file and saw that the scene has grown drastically. I looked into the text file and saw that it had stored some very very large unique resources saved as PackedByteArrays. These ar every likely textures.
Thing is, I don’t even know where this one texture was used! That’s why I didn’t remove it when it gave me an error previously.
How can I find these unique resources in the scene and remove them?
EDIT: I have reloaded an older backup of my scene and now it is back to the old 0.5MB, but I have to assume I am not the only one with this.
EDIT2: Corrected file sizes. Were previously the size of the entire projet, not just this one scene.
This is unfortunately a common issue.
The cause for this is not specifically “make unique”, but using the “make local”. Make local will take the external texture asset and embed it inside the scene as an array of bytes… which is horrible.
My guess is that if you “Make unique” a texture2D, if creates a local copy of it. Usually make unique is to use on small resources like Materials, where it duplicate the material but keep its internal textures references intact.
There is no way to know if an asset is “unique”
But you can see where that asset is coming from.
All resources have this path that says where it is getting the resource from.
It usually is like file::embeded_resource
In the image, it is a mesh that is inside the gltf::ArrayMesh. An external file, so its all good.
But if you make an asset local, a texture for example, you might see something like: “myscenefile.tscn::ArrayByte_14odfj”
It feels complicated but after you understand it. It feels natural and simple. But I think Godot could do a better job alerting when those things happen.
I’ll eventually make a video explaining these concepts, as they are super important to understand.