- Home /
Question by
isaiah_sherman · Oct 28, 2015 at 12:55 PM ·
colorgizmosgizmocolors
Set Gizmo colors to multiple Gizmos
I have a script to show 4 Gizmos on an object, and it works exactly as needed, I just want to be able to set the color for each Gizmo. How do I do this?
void OnDrawGizmos(){
Gizmos.DrawWireSphere(leftBounds, gizmoRadius);
Gizmos.DrawWireSphere(rightBounds, gizmoRadius);
Gizmos.DrawWireSphere(topBounds, gizmoRadius);
Gizmos.DrawWireSphere(botBounds, gizmoRadius);
}
Comment
Answer by charlesntt · Feb 12, 2018 at 06:01 PM
void OnDrawGizmos(){
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(leftBounds, gizmoRadius);
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(rightBounds, gizmoRadius);
Gizmos.color = Color.yellow;
Gizmos.DrawWireSphere(topBounds, gizmoRadius);
Gizmos.color = Color.green;
Gizmos.DrawWireSphere(botBounds, gizmoRadius);
}