A class in Root.Township, the global namespace.
UI component that shows one text line per InfoDisplayerAccess source, kept up to date as their text or enabled state changes.
Constructors
| Member | What it is |
|---|
InfoDisplayer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private InfoDisplayerAccess[] accesses | Sources whose text is shown. |
private Text textPrefab | Text element copied for each source. |
private Dictionary<InfoDisplayerAccess, Text> texts | The text element made for each source. |
Methods
4 private and internal methods
| Member | What it is |
|---|
private void OnDisable() | Unsubscribes from the sources and hides their text lines. |
private void OnEnable() | Subscribes to each source and shows a text line for each enabled one, creating it if needed. |
private void UpdateEnabled(InfoDisplayerAccess access) | Shows or hides a source's text line when it is enabled or disabled. |
private void UpdateText(InfoDisplayerAccess access) | Updates a source's text line, creating it if needed. |