- Home /
Question by
ina · Jan 01, 2011 at 06:28 AM ·
proceduraldebugverticeside
Debug Vertices?
In Unity IDE: Is there a way to "debug" vertices by showing where they are? Similar to how you can debug raycast by using debug to draw a line.
Is there something less "hack-ish" than instantiating a tiny prefab point at every single vertex?
Comment
Answer by Jessy · Jan 01, 2011 at 07:09 AM
http://unity3d.com/support/documentation/ScriptReference/Gizmos.html
var color = Color.white; var radius = .001;
function OnDrawGizmos () { Gizmos.color = color; var transform = this.transform; for (var vert in GetComponent.<MeshFilter>().sharedMesh.vertices) Gizmos.DrawWireSphere(transform.TransformPoint(vert), radius); }
Your answer
Follow this Question
Related Questions
Editing code in debug mode? 2 Answers
Highmap on a cube. 0 Answers
Show a screen grid at runtime 0 Answers
mesh-morph scaling badly 1 Answer