A class in Root.Township, the global namespace.
Component that stores the size of an object for placement, with an editor tickbox that measures it from the child renderers.
Constructors
| Member | What it is |
|---|
PlacementObject() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private Vector3 bounds | Backing field for Size. |
private bool getBounds | Editor tickbox that triggers measuring, then clears itself. |
Properties
| Member | What it is |
|---|
Vector3 Size { get; } | The stored size of the object. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void OnDrawGizmosSelected() | Draws the stored bounds in the editor. |
private void OnValidate() | When getBounds is ticked, measures the child renderers' bounds and stores the size. |