コード例 #1
0
        /// <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);
        }
コード例 #2
0
 /// <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);
     }
 }