private static void DrawDBVH(ObiWorld world, DBVH.DBVHNode node) { if (node == null) return; if (node.content == null){ DrawDBVH(world,world.dynamicBVH.GetLeftChild(node)); DrawDBVH(world,world.dynamicBVH.GetRightChild(node)); } Gizmos.DrawCube(node.bounds.center,node.bounds.size); }
public void OnEnable() { if (dynamicBVH == null) dynamicBVH = new DBVH(); }