문제

I made a water swirl and surface mesh in unity by script, and now I need to add wall which is a simple mesh. But I don't know how to add another mesh though. I wanted to find something like meshfilter.addmesh, but there is no such methods though. I 'm wondering how can I add another mesh or mesh filter to add that wall. I use C# btw.

도움이 되었습니까?

해결책

From the description of your problem (which is not clear enough) it looks like you should create another game object with MeshFilter and MeshRenderer components (you can do it either by hands or by script) for your wall.

If for some reason you REALLY want to have several meshes in one MeshFilter then your only option is to use submeshes (see Mesh.subMeshCount, Mesh.SetIndices, Mesh.SetTriangles, Renderer.materials and maybe Mesh.CombineMeshes).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top