Open Narfath opened 2 years ago
I haven't tried it, but this fork updated the importer, so maybe they fixed it: https://github.com/JohnGames/pb_Stl
You also have to send the mesh to a meshfilter if you want to render it
var mesh = Importer.Import(pathToFile)[0];
var meshFilter = new GameObject().AddComponent<MeshRenderer>().GetComponent<MeshFilter>();
meshFilter.sharedMesh = mesh;
I have a question how should I execute the import script during runtime?
I give the path to the Importer.Import() method but nothing happens. Is there any other parameter that I should add to the method besides the path?