Skip to content
Documentation
On this page

Launch arguments

Launch arguments open a screen, a level or a run straight away, and switches change a single launch of the game. They go after the executable: in a shortcut, a terminal or Steam's launch options

Without arguments the game opens the main menu

An AI assistant connected over MCP can send the same arguments to a game that is already running - AI assistant

Syntax

  • every argument starts with two hyphens: --editor
  • a value follows after a space or after =: --speed 1.5 and --speed=1.5 are the same
  • the key's case does not matter: --Editor works too
  • numbers use a dot whatever the system language: 1.5, never 1,5
  • a value with spaces goes in double quotes: --level "D:\My Levels\Volcano"

An argument the game cannot use never stops the launch. It is dropped, a line about it goes to the log, and the game opens its usual screen. Where the log is - Help and bug reports › Logs

Unknown arguments are ignored. The game reads only its own arguments, the ones with two hyphens. Unity's own arguments with one hyphen, for example -screen-width, pass through untouched. Set resolution and fullscreen with them

Screens

ArgumentWhat opens
--menuthe main menu, the same as no arguments
--editorthe level editor
--gamethe level given in --level, and the run starts at once
--settingsthe main menu with the settings screen on top of it

At most one screen argument is passed. Two different ones cancel each other, and the menu opens with a warning in the log

--settings can name a tab: general, audio, controls, keybindings, graphics, interface, game-editor, profile, other. Without a name the settings open on the tab you were on last time. An unknown name is dropped, and the settings open anyway

The settings open once per launch. If you return to the menu later, they do not open again. What each tab holds - Settings

Choosing a level

--level names a level by its identifier (LevelId) or by the path to its folder. A title never works: titles repeat, get translated and get edited. A value that reads as an identifier is always taken as an identifier

The level is looked up among the ones the game already shows in its list. The game will not find a folder that is not in the list

Together withWhat happens
nothingthe menu opens on the level screen and waits for Play
--editorthe editor opens with this level
--gamethe run starts at once

A password is never passed as an argument. A protected level asks for it on screen and opens after the answer

Run conditions

These conditions fill in the controls of the level screen, and the run starts as if you had pressed Play. They work only together with --game. Without it they are ignored, with a warning in the log

ArgumentValueControl on the level screen
--speedabove 0 and up to 2, rounded to 0.1Speed
--livesfrom 0 to 16, 0 is ZenLives
--seed0 or a positive integer, 0 means a new seed for every runPlayer Seed
--botnone, reflex, warmBot
--checkpoints, --no-checkpoints-Checkpoints
--no-collision-No Collision

A condition left out takes its default value: 3 lives, speed 1.0, checkpoints on, no bot, seed 0, collision on

A run started this way is an ordinary run. It goes into statistics like any other, Statistics

Switches for the whole launch

These three work with any screen and never change a saved setting:

ArgumentWhat it does
--autosave on, --autosave offturns the editor's autosave on or off for this launch. The Game Editor settings tab shows the forced value and does not let you change it
--suppress-game-savesanonymous mode for the whole launch. It cannot be turned off in the game, Settings › Anonymous mode
--frame-statswrites a frame time summary to the log, with GPU and CPU time. Used for performance measurements
--frame-stats-windowswhile a level plays, also writes a line every 0.25 s of play: the level frame and the median CPU and GPU time. Turns --frame-stats on too. When the level closes, one more line compares every window with what the rating predicted for it. Used to check Performance rating

--frame-stats writes a line per screen once every 30 seconds, and also every time the window on top of the screen changes. The first 3 seconds of a screen are not counted

Combinations

CommandResult
nothing or --menumenu
--editorthe editor with no level open
--settingsmenu, settings open on the tab you were on last time
--settings graphicsthe same, on the Graphics tab
--level Xmenu on the screen of level X, waits for Play
--level X --gamelevel X, a run in progress
--level X --editorthe editor with level X open
--game without --levelmenu and a warning
--menu --editormenu and a warning
--speed 2 without --gamethe condition is ignored, with a warning
--editor --autosave offthe editor, autosave off for this launch only
--autosave maybeignored with a warning, your setting decides
--suppress-game-savesmenu. None of the game's own saves from this launch reach the disk
--level X --game --suppress-game-saveslevel X, a run in progress, and no statistics are left after it
--editor --suppress-game-savesthe editor. Level saves, autosave and backups are written, settings and statistics are not

Examples

On Windows, from a terminal or a shortcut:

"Bullet Hero.exe" --editor
"Bullet Hero.exe" --level 5f2b0e6a-1c3d-4b5e-8a9f-0d1e2f3a4b5c --game --lives 1 --speed 1.5
"Bullet Hero.exe" --level "C:\Users\<you>\AppData\LocalLow\vertoker\Bullet Hero\levels\Volcano" --editor

In Steam, the game's launch options take only the arguments, without the executable: --editor --autosave off

Android

Android has no command line. The arguments are passed in the bh string extra of the intent that launches the game, and are split exactly like a typed line. From a computer this is done with adb:

adb shell "am start -S -n com.vertoker.BulletHero/com.unity3d.player.UnityPlayerGameActivity -e bh '--frame-stats --editor'"
  • The quotes matter. The whole am start goes in double quotes, the bh value in single quotes. Otherwise the device's shell splits the line: only the first argument reaches bh, and the rest go to am as its own parameters
  • -S stops the running game first. The arguments are read once, at launch. Sending them to a game that is already running changes nothing

iOS has no launch arguments at all