Update gizmoManager.cs
This commit is contained in:
parent
8274a41933
commit
37b6bc6cc8
@ -6,10 +6,13 @@ public class gizmoManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
|
|
||||||
void OnDrawGizmos()
|
void OnDrawGizmos()
|
||||||
|
{
|
||||||
|
if (!this.gameObject.transform.parent.name.Contains("chunk"))
|
||||||
{
|
{
|
||||||
Bounds bounds = GetChildRendererBounds(gameObject);
|
Bounds bounds = GetChildRendererBounds(gameObject);
|
||||||
Gizmos.DrawWireCube(bounds.center, bounds.size);
|
Gizmos.DrawWireCube(bounds.center, bounds.size);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Bounds GetChildRendererBounds(GameObject go)
|
Bounds GetChildRendererBounds(GameObject go)
|
||||||
{
|
{
|
||||||
Renderer[] renderers = go.GetComponentsInChildren<Renderer>();
|
Renderer[] renderers = go.GetComponentsInChildren<Renderer>();
|
||||||
|
Loading…
Reference in New Issue
Block a user