I’m trying to import .obj files and then export them as .mesh. This has been simple enough (running as an editor script)
var mesh = load(objPath)
var savePath = "somepath.mesh"
ResourceSaver.save(mesh,savePath ,4)
The problem I’m running into is that the file size seems to be somewhat random. When running the same code for identical meshes, they will sometimes be double what they are other times - no change to the code, identical input obj.
I have a huge number of them so am hoping to keep the size to a minimum.
I’ve run it again today and the filesize is smaller again. I was going to upload but figured I’d have another check, and I have found the difference. The larger one has the property ‘shadow_mesh’ set.
I’m not sure how to stop this? Searching for it in the editor gives me:
Resource Import Scene
-meshes/create_shadow_meshes
I don’t know if this is something I can change or how to use it. Perhaps I could just set the property to null to forcibly remove it?
EDIT: Seems to work just setting it to null
EDIT2: Was another problem but I’m going to make a new post since it’s more specific now