I obviously know the gist of it, but there has been so many changes and I have only been able to make ONE editable mesh, and that was months ago. Currently I feel like there is no documentation on how to just even put an editable mesh into the workspace. I feel like I can’t even learn how these work because the only people I’ve seen do anything with editable meshes already somehow know exactly how to use them.
How do I create editable mesh and literally just see in in workspace? (???)
Okay well I do know about the triangles and the vertices but even if I have those, I still have no idea how to generate the mesh, and even worse, SEE it.
That’s it. One question. I feel like the documentation is useless as it doesn’t give any basic code on how to just generate an editable mesh and just see it. Now, I don’t have 32 PHD’s in coding and math but I feel like this is unnecessarily complicated.
It’s a bit complicated but I was able to learn it and I’ll teach you.
First off, you need to create an editable mesh, you can do that using this method in AssetService:
It mainly requires a Content parameter which can be made using the Content data type:
You can just do: Content.fromtUri(--Asset Id Goes Here!)
Or MeshPart.MeshContent
For the latter statement, you don’t need to use the Content data type as it itself returns a content.
Just pass this into the CreateEditableMeshAsync method and you’ll be returned an editable mesh.
Now, to apply it onto a mesh, you can simply do: MeshPart:ApplyMesh()
Going to post the method I found to be working since I was also curious about how to create empty meshes:
Create an EditableMesh using AssetService:CreateEditableMesh().
Populate the EditableMesh with vertices and triangles (you must do this as you cannot create MeshParts with empty EditableMeshes)
Create the MeshPart using the AssetService:CreateMeshPartAsync(Content.fromObject(EditableMesh)).
By default you don’t need to do anything else as the MeshPart will already have the editable mesh applied. You can then use the EditableMesh to influence the MeshPart’s appearance.