Use WarningManager.Instance to get the singleton instance.
StaticInstanceGets the singleton instance of the WarningManager
Immediately flushes all pending warnings to the console. Can be called manually to force output before the debounce period.
Gets the current configuration
The Global Object Store is a place to store global objects that need to be shared across the application. Depending on the execution environment, this could be the window object in a browser, or the global object in a node environment, or something else in other contexts. The key here is that in some cases static variables are not truly shared because it is possible that a given class might have copies of its code in multiple paths in a deployed application. This approach ensures that no matter how many code copies might exist, there is only one instance of the object in question by using the Global Object Store.
Records a deprecation warning for an entity.
The name of the deprecated entity
The name of the caller (e.g., 'BaseEntity::constructor')
true if this warning should be emitted immediately (when ShowAll is true)
Records a deprecation warning for an entity field.
The name of the entity containing the deprecated field
The name of the deprecated field
The name of the caller (e.g., 'MJAIPromptEntity::validate')
true if this warning should be emitted immediately (when ShowAll is true)
Records a warning when a field is not found in an entity definition. This typically occurs during data loading when source data contains fields that don't exist in the entity schema.
The name of the entity where the field was not found
The name of the field that was not found
Context description (e.g., 'BaseEntity::SetMany during data load')
true if this warning should be emitted immediately (when ShowAll is true)
Records a warning when multiple engines load the same entity data. This helps developers identify redundant data loading that could be optimized.
The name of the entity being loaded
Array of engine class names that have loaded this entity
true if this is a new warning that will be emitted
Resets all tracking state. Useful for testing or starting fresh. Does NOT clear pending warnings - call FlushWarnings first if needed.
Updates the configuration for the warning system. This allows runtime customization of behavior.
Protected StaticgetReturns the singleton instance of the class. If the instance does not exist, it is created and stored in the Global Object Store. If className is provided it will be used as part of the key in the Global Object Store, otherwise the actual class name will be used. NOTE: the class name used by default is the lowest level of the object hierarchy, so if you have a class that extends another class, the lowest level class name will be used.
OptionalclassName: string
Singleton class that manages warnings across the entire application session. Tracks which warnings have been shown and batches them for clean, grouped output.
Uses BaseSingleton to guarantee a single instance across the entire process, even if bundlers duplicate this module across multiple execution paths.