LogModule
Tsvrc.Editor.LogModule generates the _log field, the Log property override, and the
_TsLogStart() startup call that wire a scene TsvrcLogger
into the generated root. It's a thin subclass of
TsSingleComponentModule, which does essentially all the
real work. See that page for the shared mechanics (usage detection, self-healing scene
object, tree-shaking).
Usage
A script never touches the generated _log field directly: call the wrapper methods
TsvrcBehaviour already gives every behaviour:
LogInfo("Round started");
LogWarning("Slot already occupied, skipping");
What's specific to LogModule
- Extra usage detection. A script rarely writes
_ts.Logdirectly: it callsTsvrcBehaviour.LogInfo/LogWarning/LogError, which reach the logger indirectly. Those wrapper calls never textually mention_ts.Log, soTsSingleComponentModule's base member-access check alone would miss the single most common way logging actually gets used.LogModulereports those three method names as additional usage signatures so tree-shaking doesn't wrongly conclude an actively-used logger is dead. - No standalone Configure tab. Logging settings are rendered as a section inside the
Settings tab rather than getting their own top-level tab.
FindLogger,DetermineNotFoundMessage, andDrawFieldsexist specifically to let that host tab own theTsvrcLoggercomponent'sSerializedObjectlifecycle and batch its edits through the same Apply/Discard flow every other tab uses, rather thanLogModulemanaging its own.