A class in Root.Township, the global namespace.
A world space popup with a title and a message. Destroys its own GameObject when closed, unless set not to.
Constructors
| Member | What it is |
|---|
PopupBoard() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private bool destroyGameObjectOnClose | Whether Close destroys the board's game object (default true). |
private TextRenderer messageText | Text renderer behind Message. |
private TextRenderer titleText | Text renderer behind Title. |
Properties
| Member | What it is |
|---|
string Message { get; set; } | The body text shown on the popup. |
string Title { get; set; } | The title text shown on the popup. |
Transform Transform { get; } | The popup's transform, so callers can place it. |
Events
| Member | What it is |
|---|
event Action<IPopupBoard> Closed | Raised when Close is called, before the popup is destroyed. |
Methods
| Member | What it is |
|---|
void Close() | Raises Closed, then destroys the popup's GameObject if it's set to. |
override string ToString() | Returns the popup's title and object name, for logs. |
Used in
Members of other types that take, return or hold a PopupBoard: