static public void DebugBoxColliders() { BoxCollider[] boxColliders = FindObjectsOfType <BoxCollider>(); foreach (BoxCollider item in boxColliders) { Interactable[] parent = item.GetComponentsInParent <Interactable>(); if (parent.Length <= 0) { Vector3 position = item.center; Vector3 scale = item.size; WireBox.Render(position, scale, item.transform, Instance.debugMaterial2); } } }
static public void DebugShowBoundingBox() { Interactable[] interactables = InteractableManager.InteractableList; foreach (Interactable item in interactables) { BoxCollider[] colliders = item.GetComponentsInChildren <BoxCollider>(); foreach (BoxCollider box in colliders) { Vector3 position = box.center; Vector3 scale = box.size; WireBox.Render(position, scale, box.transform, Instance.debugMaterial); } } }