TextRendererBackground
A class in Root.Township, the global namespace.
Adds a quad behind a TextRenderer sized to its text plus a margin, and keeps it fitted when the text changes. Not set up on headless servers.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
TextRendererBackground() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|---|
private Material androidMaterial | Material meant for Android; the code here only uses pcMaterial. |
private Vector2 margin | Extra width and height around the text. |
private static Mesh mesh | Shared quad mesh used by every background. |
private Material pcMaterial | Material on the background quad. |
private Transform rendererTransform | Transform of the created background object. |
private TextRenderer textRenderer | The text renderer to fit. |