/// <summary> /// Unity Callback. Called in the Editor to draw Gizmos on each GUI update. /// </summary> void OnDrawGizmos() { Collider[] colliders = includeChildren ? GetComponentsInChildren <Collider>() : GetComponents <Collider>(); if (colliders == null) { return; } GizmoUtil.DrawColliders(colliders, color, solid); }
/// <summary> /// Unity callback. Called in the editor to draw gizmos in the scene view. /// </summary> void OnDrawGizmos() { using (GizmoUtil.With(Color.white, transform)) { Gizmos.DrawWireCube(_bounds.center, _bounds.size); } }