- Home /
Does Unity give access to their function that creates MeshParts (splits meshes that are >65k verts on import)?
I'm writing some code to import a few different 3D model formats at runtime, and I need to handle the case where the imported model is too large for a Unity mesh and needs to be split up. Yes, I've seen some implementations of this (and others have asked for some example script), and I get the basics of constructing the algorithm, but it seems silly to rewrite something that seems to already be part of the engine that I'm paying for. I couldn't find anything that mentioned it in the documentation (I essentially scanned all the classes in UnityEngine). So, does anyone know whether their function to split large meshes into parts <65k is callable?
I feel like I should just tag @Eric5h5 on this, considering this question will probably summon him anyways.
And please, don't respond with telling me that meshes shouldn't be larger than 65k anyways. I've seen that irrelevant response on way too many posts. It's not the question I'm asking, and for my use case, is not of concern to me at all. I just want to know whether I should proceed with writing my own code to handle that case or not.
I ended up writing my own splitting algo, but I'm still interested in the answer to this.
Answer by Bunny83 · Aug 13, 2016 at 08:29 AM
No, there is no such code in the engine. The splitting code belongs to the editor and is not available at runtime. Furthermore the importing and splitting is implemented in native code and doesn't have any low-level API which could be used. The whole import procedure is done in native code and the only influences you have are the settings in the import inspector and what you can do with AssetPostProcessors.