Mesh Compression For Player Needs

Hi

I am using Mesh Compression in unity. I have used the below code for mesh compression through scripting.

var m = new Mesh ();

var m = new Mesh ();
m.vertices = vertices;
m.triangles = triangles;
MeshUtility.SetMeshCompression (m, ModelImporterMeshCompression.High);
AssetDatabase.CreateAsset (m, "Assets/CompressedMesh.asset");
AssetDatabase.SaveAssets ();

Mesh Compression is on three basics Medium, High, Low.

My Question is Is it possible to Compression on the basis on the user Percentage. For eg. I want mesh compression only on 50 % or my desired input.

Thanks in advance…

The compression quantizes values , so compression by losing precision so its not possible to make it a % You will also see less precision the further the distance from the origin.

1 Like