I have a .stl file on disk that is being correctly loaded as a MDLAsset by MDLAsset.init(url:), and the MDLMesh is extracted from there seamlessly.
The problem is that I cannot create a ModelEntity using said mesh. All constructors for it only take MeshResource as a argument, and I can't seem to convert MDLMesh to a MeshResource - which doesn't make much sense.
Unfortunately I cannot use Entity.loadModel because it either panics with a bad memory access or loads my models incorrectly (the Z dimension is lost, so it's like the model is just a plane).
Any pointers on this?