modl.ai
Configure your code

Make sure your bot can explore your game with minimal friction by telling modl to ignore any code that doesn’t apply to automatic test processes. You can also add code that only applies your modl testing process, such as custom events. To do this, use the MODL_AUTOMATIC_TESTING scripting define.

For example, to allow modl:test to control your game’s input you might need to disable your input code in the following way:

void Update()
{
#if !MODL_AUTOMATIC_TESTING
m_Movement.Set(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
m_Camera.Set(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y"));
m_Jump = Input.GetButton("Jump");
#endif
}

Object cleanup

If your game destroys all the game objects in your scene at any point, you need to add an exception for any object you want modl to continue to track. To add an exception, use the MODL_AUTOMATIC_TESTING to wrap your object cleanup code.