Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


StateMachineLogger

Provides methods for logging messages, warnings, and errors associated with a state machine.
Read time 1 minuteLast updated 13 days ago

Definition

public class StateMachineLogger

Remarks

StateMachineLogger
integrates with the Unity Console to display logs relevant to state machine operations.
When a context is provided, the message is also visually represented in the state machine editor using appropriate markers (error, warning, or info).
Console messages are only shown if the state machine editor for the corresponding state machine is currently open. If the editor is closed, the logs will not appear in the Unity Console.
The logger also provides read-only access to what changed in the state machine via StateMachineLogger.StateMachineChanges.

Properties

Property

Description

StateMachineChangesThe set of changes recorded on the state machine during the current StateMachine.OnStateMachineChanged callback.

Methods

Method

Description

LogLogs an informational message.
LogErrorLogs an error message.
LogWarningLogs a warning message.