Skip to main content

SignPostPanel

A class in Root.Township, the global namespace.

Editor sizing helper for a sign post panel: scales the mesh, content and text canvas to one size. Kept out of static flattening and splitting.

Constructors​

MemberWhat it is
SignPostPanel()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private Transform contentTransform scaled on Z by the panel depth.
private Transform meshTransform scaled on X and Y by the panel size.
private Vector3 sizePanel width, height and depth.
private Text textThe panel's UI text; its canvas is resized to fit.
private Vector2 textScaleCanvas units per unit of panel size.

Methods​

1 private and internal method
MemberWhat it is
private void OnValidate()Applies size to the mesh and content scales and sizes the text canvas from textScale.