<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Getting Started

Architecture

Level System

Characters & Vehicles

Run Mechanics

World Objects

Boosters & Modifiers

Progression & Economy

UI

Save & Debugging

Modules

Publishing

Reference

💰 Monetization (Ads & IAP)

<aside> 💡 LogManager writes log messages by category and Checkpoint marks key points of the game flow. Both are compiled out of the build unless the matching define is enabled.

</aside>

Subsystems

LogManager

Method Description
Log(message, category) Info message. The default category is Game.
LogWarning(message, category) Warning.
LogError(message, category) Error.
LogManager.Log("[Shop]: Opened", LogCategory.Game);

A message appears only when the define of its category is enabled.

Category Define Use
Game DEBUG_LOGS_GAME Game code.
Systems DEBUG_LOGS_SYSTEMS Core systems such as the initialization.
Services DEBUG_LOGS_SERVICES SDKs and services.
Checkpoint DEBUG_LOGS_CHECKPOINT Checkpoints.

Enabling the categories

Open Actions → Log Categories and toggle a category, or use All On and All Off. The menu changes the scripting define symbols of the project. The defines can also be changed with Window → Watermelon → Tools → Define Manager.

Before a build, LoggingDefinesBuildWarning shows a warning when any logging define is enabled. Disable the categories for a release build.

Checkpoint

Checkpoint.Log(label, context) writes a green message with the label when DEBUG_LOGS_CHECKPOINT is enabled. The call is removed from the build otherwise.

Checkpoint.Log("Settings opened", gameObject);

The template calls it when a page opens, for example UISettings, UIGame, UIRunResult and UIProgression. The checkpoint list shows the route that the player took through the game. Add a checkpoint to every new page and to key flow points.

Define Manager

Window → Watermelon → Tools → Define Manager lists the defines of the project and the modules, such as MODULE_ADS and MODULE_IAP, and toggles them. Modules check these defines with #if MODULE_ADS. See Modules.