Realot StudioDocs
Components

ChatLog

Realot Studio ChatLog component reference: fields, script API, behavior and examples.

View as Markdownllms.txt
ScopeThis page documents the ChatLog component in Realot Studio. Runtime fields are serialized scene data; the Script API section lists only members intentionally exposed to game scripts.
Where to find it in the editorTop UI → Chat Log, or Inspector → Add Component → Chat Log.

#What it does

Scrollable-style conversation log component for UI dialogue.

Component setup & editor toolsChatLog provides a dialogue/log display component intended for scripted text updates.

#How to add and use ChatLog

Editor path: Select the target entity in the Hierarchy (left side) → look at the Inspector (right side) → click Add Component at the bottom of the Inspector → search for ChatLog → click the component row. The Add Component picker is a centered modal with a search box; it only lists components not already attached.

For components with a dedicated editor tool, the tool is opened or activated from the location described below. Do not assume that adding the component alone activates its editor; some systems require a separate window, panel, or viewport tool.

#Component setup & editor tools

  • Inspector → ChatLog: configure the log; use its script-facing API for runtime messages/entries.

#What you should see after adding it

The component appears as its own section in the Inspector. Its serialized settings are listed in the Component data table below. If a field is conditional, it appears only when the relevant mode/type is selected. If a field is a runtime state field (for example grounded or resolved velocity), treat it as read-only diagnostic state unless the API reference explicitly documents it as writable.

#How to read the settings

For every setting below, the documentation distinguishes type, default, meaning, and tuning direction where behavior is known. When a value represents a direction, use the engine's coordinate convention documented in Coordinate system; do not substitute Unity/Godot conventions.

#Component data

FieldTypePurposeDefault
messagesarray[{ sender, text, senderColor }], oldest first[]
maxMessagesnumbertotal history kept — oldest dropped once exceeded50
visibleCountnumberhow many of the most recent messages are shown at once6
widthnumberLog width.320
lineHeightnumberLine height.26
fontSizenumberFont size.16
fontFamilystringFont family.Arial
messageColorhex color stringMessage color.#ffffff
senderColorhex color stringdefault sender-name color if a message doesn't specify its own#ffd700
backgroundColorhex color stringBackground.#000000
backgroundOpacitynumbersemi-transparent panel behind the text, typical chat-overlay look0.5
paddingnumberPadding.10
showSenderbooleanfalse = just the message text, no "Name: " prefix (good for narration logs)true
screenSpacebooleansee TextRenderer.js's file header for the exact meaning — true = fixed UI overlay, false = world-space (e.g.true
visiblebooleanVisibility.true

#Tuning behavior

These are the practical direction-of-change rules for the most important controls on this component.

SettingWhat changing it does
maxMessagesTotal retained history before oldest messages are dropped.
visibleCountHow many recent messages are shown at once.
backgroundOpacity0 transparent, 1 opaque.
lineHeightHigher creates more vertical spacing between messages.

#Script API

MemberKindDescription
backgroundColorProperty (read/write)Background color.
backgroundOpacityProperty (read/write)Background opacity.
clear()MethodThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
fontFamilyProperty (read/write)Font family.
fontSizeProperty (read/write)Font size.
lineHeightProperty (read/write)Line height.
maxMessagesProperty (read/write)Maximum retained messages.
messageColorProperty (read/write)Message color.
messagesProperty (read-only)The `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
paddingProperty (read/write)Padding.
screenSpaceProperty (read/write)Screen-space mode.
send(sender, text, color)MethodThe `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
senderColorProperty (read/write)The `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
showSenderProperty (read/write)The `this.chat` sub-object exposed to user scripts (see scripting/ScriptAPI.js).
visibleProperty (read/write)Visibility.
visibleCountProperty (read/write)Number of visible rows.
widthProperty (read/write)Panel width.

#Examples

js
this.chat.send("Guard", "Halt!", "#ef4444");
Need the full workflow?Components: complete workflow covers adding, configuring, testing, combining, and removing components.