Skip to content

Instantly share code, notes, and snippets.

View Parell's full-sized avatar
💀
Dying slowly

Daniel John Parell

💀
Dying slowly
  • Minnesota
View GitHub Profile
@Parell
Parell / BoundsExtension.cs
Last active November 3, 2023 19:53
Unity game engine local bounds script with child component encapsulation.
using UnityEngine;
public static class BoundsExtension : MonoBehaviour
{
public static Bounds LocalBounds(GameObject parentObject)
{
List<MeshFilter> meshs = new List<MeshFilter>();
meshs.AddRange(parentObject.GetComponentsInChildren<MeshFilter>());
Debug.Log(meshs.Count);