Skip to main content

InfoDisplayerAccess

A class in Root.Township, the global namespace.

A debug text asset that code writes a line of text to and an InfoDisplayer shows on screen. Wraps the text in a set prefix and suffix.

Constructors​

MemberWhat it is
InfoDisplayerAccess()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private string prefixText put before every value passed to UpdateText.
private string sufixText put after every value passed to UpdateText.

Properties​

MemberWhat it is
bool IsEnabled { get; private set; }Whether the text should be shown. Turned on automatically by UpdateText.
string Text { get; private set; }The current text, prefix and suffix included.

Events​

MemberWhat it is
event InfoDisplayerAccess.AccessUpdate EnabledUpdatedRaised when IsEnabled changes.
event InfoDisplayerAccess.AccessUpdate TextUpdatedRaised when the text changes.

Methods​

MemberWhat it is
void SetEnabled(bool isEnabled)Shows or hides the text.
void UpdateText(string text)Sets the text (adding prefix and suffix) and enables it. Ignores changes that differ only in case.

Used in​

Members of other types that take, return or hold a InfoDisplayerAccess: