Created
December 13, 2021 05:55
-
-
Save antoinefortin/f86375abf8407ffa29b60b0a4c25c4d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnDrawGizmosSelected() | |
{ | |
Gizmos.color = Color.red; | |
listVert[0] = vert0; | |
listVert[1] = vert1; | |
listVert[2] = vert2; | |
for (int i = 0; i < listVert.Length; i++) | |
{ | |
Gizmos.DrawCube(listVert[i], new Vector3(1.0f, 1.0f, 1.0f)); | |
// Draw line between Verts | |
if (i == (listVert.Length - 1)) | |
{ | |
Gizmos.DrawLine(listVert[i], listVert[0]); | |
} | |
else | |
{ | |
Gizmos.DrawLine(listVert[i], listVert[i + 1]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment