Skip to main content

LiveDataDisplayBase

An abstract class in Root.Township, Alta.Utilities.Profiling.

Base asset for one line of the live debug data display (a title and a value). Subclasses supply the value text.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private bool editorOnlyBacking field for EditorOnly. When set, IsValid is false outside the editor.
private string overrideTitleOptional title shown instead of the subclass's Title.

Properties​

MemberWhat it is
bool EditorOnly { get; }If true, the line is only valid in the Unity editor.
virtual string Output { get; }The title (or override title), a colon and the value.
protected virtual string Title { get; }Default title, used when no override is set.
1 private and internal property
MemberWhat it is
private string FinalTitle { get; }overrideTitle if it is set, otherwise the subclass's Title. Used as the prefix of Output.

Methods​

MemberWhat it is
virtual void InternalUpdate(LiveDataDisplayView view)Per-update hook with the display view. Does nothing by default.
virtual bool IsValid()Whether the line should show. False outside the editor for editor-only lines.
virtual void RunOnDisable()Hook called when the display is turned off.
virtual void RunOnEnable()Hook called when the display is turned on.
protected abstract string GetData()Returns the value text.

Used in​

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