protected virtual void Update() { if (CanDrawCollider()) { Bounds bounds = m_BoxCollider.bounds; Quaternion rotation = transform.rotation; rotation *= Quaternion.Euler(Vector3.right * 90f); GLDebug.DrawSquare(bounds.center, rotation, new Vector3(m_BoxCollider.size.x, 0f, m_BoxCollider.size.y), m_ColliderColor); } }
public void drawDebug() { const float f = Chunk.SIZEf / 2; GLDebug.DrawSquare(this.chunkPos.toWorldSpaceVector() + new Vector3(f, 0, f), Quaternion.identity, new Vector3(SIZE, SIZE, SIZE), Colors.magenta); foreach (MapObject obj in this.mapObjects) { obj.drawDebug(); } }