LayoutHelper2D
A class in Root.Township, the global namespace.
Lays out a number of equal elements in a grid on a background panel, shrinking them if needed. Used by the gymnasium prefab spawner to place its buttons.
- Listed in Global namespace: I to L
- Nested types
LayoutInfo
Constructors
| Member | What it is |
|---|---|
LayoutHelper2D(Vector3 backgroundSize, Vector3 elementSize, int elementCount, bool isVertical = true, float minBuffer = 0.025) | Creates a LayoutHelper2D from backgroundSize, elementSize, elementCount, isVertical and minBuffer. |
Fields
10 private and internal fields
Methods
| Member | What it is |
|---|---|
LayoutHelper2D.LayoutInfo GetPositionsAndScaleFactor() | Returns the grid positions and scale. It relies on gridSize from CanFitObjects, which nothing calls, so it probably returns an empty result. |