Running with a Standalone Environment from CLI
Running Schola from the command line interface (CLI) is a powerful way to interact with the system. This guide will walk you through the steps to run Schola from the CLI, including how to set up your environment and execute commands.
Building Your Environment
Before you can run a standalone executable from the Command-line with Schola, you need to build your environment into a standalone executable. This involves packaging your Unreal Engine project which is detailed in the official unreal engine documentation.
Running From CLI
To launch a standalone environment (i.e. A game built in Development or Shipping mode), you can use the following command:
The <PATH_TO_EXECUTABLE> should be replaced with the path to your packaged Unreal Engine executable.
Headless Mode
Schola can be run in headless mode, which is useful for running scripts or automating tasks. To run Schola in headless mode, use the following command:
This command will start Schola without the graphical user interface (GUI), allowing for accelerated simulation speeds.
Note
Any features requiring rendering will not work when running in headless mode (e.g. CameraObserver
).
Fixed Simulation Timestep
Schola allows you to set a fixed frames per second (FPS) for the simulation. This can be useful for ensuring consistent performance across different runs. To set a fixed FPS, use the following command:
Replace <FPS> with the desired frames per second value. For example, to set the FPS to 30, use:
Note
The FPS determines the delta used when calculating updates in Unreal Engine, however the number of timesteps simulated per second is independant of this setting. For example if –fps=100 and Unreal simulates your environment at 1000fps then for every second in the real world, 10 seconds in the environment will be simulated.
Controlling The Map
Schola allows you to specify the map to load when launching the environment. To do this, use the –map argument followed by the path to the map. For example:
The map should be specified as a relative path from the Content folder, with content replaced with Game For exammple /Content/LevelOne/Map would be specified as Game/LevelOne/Map.
Note
The map must be a valid Unreal Engine map file. If the map is not found or isn’t specified, Schola will default to the main map specified in the project settings.
Note
The map parameter will not work with Shipping builds by default, you need to take additional steps to allow the map to be loaded based on a command line flag.
Additional Settings
For details on settings specific to Stable Baselines 3 and RLLib see, schola-rllib Command and schola-sb3 Command respectively.