- Home /
Rendering MeshColliders in a game build
I need to render MeshColliders (All 3D colliders if possible) in a game build. I can't find any tools for doing so. If you know any it would be nice if you shared it and if not where should I start if I want to make the tool my self?
You could simulate the rendering by using a LineRenderer with all the vertices of the collision mesh. You could use a custom drawing function like this as well, like Drawing.cs from the user wiki. You could use GL.Drawlines. You could make a child for each meshcollider and give it it's own meshrenderer, but use the collision mesh for it.
Answer by BastianUrbach · Feb 20, 2018 at 09:03 PM
I don't know a tool to do that but you can use FindObjectsOfType to get all MeshColliders, MeshCollider.sharedMesh to get the mesh of a MeshCollider and Graphics.DrawMesh to draw a mesh. If I understood your problem correctly, it should be possible to do what you need with those methods.
Your answer
Follow this Question
Related Questions
Why my asset rejected in unity asset store publishing? 2 Answers
iOS In-App-Purchases with javascript? 0 Answers
Changing two different objects renderer colour 1 Answer
No response from Editor's Asset Store 4.5.1 2 Answers
Asset check on assetstore 0 Answers