modl.ai
Project structure

The Unity demo project includes configuration files for you to apply during setup. The configuration files contain presets for the bot and levels. For more information, refer to Set up. The descriptions below outline the bot and level setting that the configuration files apply.

The table below describes the configuration files that the Unity demo project includes:

Configuration file Description
game_config.json The game configuration file includes the information that the brain needs to run tests on your game.
modl_map_config.json The map configuration file includes level images that the platform uses for test reports.

Bot configuration

Bot configurations vary depending on your game. The Unity demo project shows a typical 3D game bot configuration which includes a player character that moves around a 3D space. The following descriptions outline the bot configuration fields and the settings that the Unity demo project applies.

Player prefab

The player prefab represents the player character that you want the modl bot to control. Usually, the player prefab has the character controller component. In the Unity demo project, the player prefab is called ModlBean.

Input variables

Input variables are the inputs that a human player would use to control the player character. You need to give the bot access to any input variables that you want the bot to use to explore your game. In the Unity demo project the bot can access the move, jump and sprint input variable.

Exploration space variables

The exploration space is the environment that your bot experiences. Use the exploration space to tell your bot how to determine whether it has reached a new game state. The Unity demo project tracks the bot’s position. This means that if a bot position changes (the bot moves), modl checks if the bot has reached a new game state.

Game state variables

The game state variables are the values that you want the bot to report on. The values that you track as game state variables show in the test report. To get the best overview of the bot's test run, you also need to track any exploration space variables as game state variables. For example, the bot position.

To view test reports created using the Unity demo project, log in to the platform and go to Modl Demo **> **Tests > View report.

The Unity demo project tracks the following game state variables:

Tracked variable Reason
ModlBean position Shows where the bot has been during a test run.
HasKey and Score Shows if the bot has triggered any important events during the test run. You can track any game logic variable.
Grounded Shows if the Grounded variable works as intended. You can track any physics variable.
Waypoint position and index Track and activate any waypoints in your level to use the Directed Explorer. For further information, refer to Set up the Directed Explorer.

Level configuration

When you upload a build to the platform, the bot explores the levels you include. To view the bots exploration path in a test report, you need to provide an image for each level and a level load command.

To view the Unity demo project’s level configuration, complete the Set up instructions and go to modl > Level Configuration. The project uses a LoaderScene scene with an attached LevelLoader script to define level load commands for the platform to use. To view the LevelLoader script go to Assets/Modl/LevelLoader.cs.