PointerGameObjectExtensions
A static class in Root.Township, the global namespace.
Extension methods for working out the bounds of a game object from its renderers and colliders, used for pointer and menu previews.
- Listed in Global namespace: P
- Attributes
Extension
Methods
| Member | What it is |
|---|---|
static Bounds GetObjectBounds(GameObject go) | Bounds of all child renderers, skipping particle renderers and anything marked IgnoreForBounds. |
static Bounds GetObjectBoundsWithColliders(GameObject go) | Like GetObjectBounds but also includes child colliders, estimating sizes for disabled ones from their shape. |
static Bounds GetPointerBounds(GameObject prefab) | Uses a StaticBoundsOverride if present, else renderer and collider bounds, inflated by MenuSettings when large enough. |