Closed ZoomDomain closed 6 years ago
Check out pb_Stl_Importer.cs
. The Import
function returns an array of meshes. Usually it will just be a single mesh, but if the vertex count is greater than the max allowed it will be split into multiple meshes.
Ex:
Mesh[] result = pb_Stl_Importer.Import("/dir/MyModel.stl");
foreach(Mesh m in result)
{
GameObject go = new GameObject();
go.AddComponent<MeshRenderer>().sharedMaterial = material;
go.AddComponent<MeshFilter>().sharedMesh = m;
}
Brilliant Thanks! Import namespace parabox.STL too :D
How can I import an STL to a GO in runtime via script? which functions? maybe add the infos to the readme file? THANKS!