<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Unity.Multiplayer%2Farticles%2Fbots</id>
	<title>Unity.Multiplayer/articles/bots - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Unity.Multiplayer%2Farticles%2Fbots"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/bots&amp;action=history"/>
	<updated>2026-12-05T07:56:25Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/bots&amp;diff=906&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Unity.Multiplayer/articles/bots&amp;diff=906&amp;oldid=prev"/>
		<updated>2026-11-29T20:36:31Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Bots and end-to-end smoke tests =&lt;br /&gt;
&lt;br /&gt;
A bot is your game, launched headless with &amp;lt;code&amp;gt;-bot &amp;amp;lt;role&amp;gt;&amp;lt;/code&amp;gt;, playing itself over the real network. The library does all of the plumbing: it keeps the scene from serving or showing menus, joins by code through the rendezvous service, and then hands the connected session to &amp;lt;strong&amp;gt;your bot driver&amp;lt;/strong&amp;gt;, the only bot code a game writes. The same build runs as the dedicated server, so one Linux player, a rendezvous container and N bot containers make an end-to-end smoke test of the whole game. &amp;lt;code&amp;gt;mp-host game smoke&amp;lt;/code&amp;gt; runs that locally, and one job in a nightly workflow runs it in CI.&lt;br /&gt;
&lt;br /&gt;
Unity.Cursory is the first game on it: its two bots grab a heavy block from both ends and drag it around a wall onto a pad, a level one player cannot solve.&lt;br /&gt;
&lt;br /&gt;
== What a new game does ==&lt;br /&gt;
&lt;br /&gt;
A game made with &amp;lt;strong&amp;gt;MindAttic ▸ Multiplayer ▸ New Game…&amp;lt;/strong&amp;gt; already has all four steps below: its &amp;lt;code&amp;gt;GameBot&amp;lt;/code&amp;gt; driver, &amp;lt;code&amp;gt;BotTests&amp;lt;/code&amp;gt; (a &amp;lt;code&amp;gt;NetBotTest&amp;lt;/code&amp;gt;), an &amp;lt;code&amp;gt;mp-host.json&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;&amp;quot;bots&amp;quot;: &amp;quot;A,B&amp;quot;&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;.github/workflows/nightly.yml&amp;lt;/code&amp;gt;. See [[Unity.Multiplayer/articles/getting-started#8. Bots end to end, and every night (2 minutes)|Getting started]]. For an existing game:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;strong&amp;gt;Write a driver.&amp;lt;/strong&amp;gt; One class, anywhere in the game&amp;#039;s code:&amp;lt;br&amp;gt;&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;using System.Threading.Tasks; using Unity.Multiplayer; using UnityEngine;  [NetBotDriver]                                   // found by itself; or make it a component in the scene public sealed class RunnerBot : IBotDriver {     public async Task RunAsync(NetBot bot)       // called once the bot has joined     {         Runner me = await bot.LocalPlayer&amp;amp;lt;Runner&amp;gt;();               // this bot&amp;#039;s player object         Flag flag = await bot.Spawned&amp;amp;lt;Flag&amp;gt;();                     // any replicated object         me.RunTo(bot.Role == &amp;quot;A&amp;quot; ? flag.Left : flag.Right);        // [ToServer] calls, as a player&amp;#039;s input would         await bot.Until(() =&amp;gt; flag.Captured, &amp;quot;the flag to be captured&amp;quot;, 60f);         bot.Pass(&amp;quot;captured the flag in &amp;quot; + bot.Scenario);         // logs &amp;quot;&amp;amp;#91;NetBot:A] OK: ...&amp;quot;     } }&amp;lt;/pre&amp;gt;&lt;br /&gt;
# &amp;lt;strong&amp;gt;Test it in process&amp;lt;/strong&amp;gt; with the test kit&amp;#039;s &amp;lt;code&amp;gt;NetBotTest&amp;lt;/code&amp;gt; (below): a dedicated server and N bots in one PlayMode test, no Docker.&lt;br /&gt;
# &amp;lt;strong&amp;gt;Run the real thing&amp;lt;/strong&amp;gt; from the project folder (needs Docker and the project&amp;#039;s Unity version):&amp;lt;br&amp;gt;&amp;lt;pre class=&amp;quot;md-code lang-text&amp;quot;&amp;gt;mp-host game smoke                      # two bots, A and B mp-host game smoke --bots 4 --scenario ctf-2&amp;lt;/pre&amp;gt;&lt;br /&gt;
# &amp;lt;strong&amp;gt;Nightly in CI&amp;lt;/strong&amp;gt;: add &amp;lt;code&amp;gt;.github/workflows/nightly.yml&amp;lt;/code&amp;gt; with one job:&amp;lt;br&amp;gt;&amp;lt;pre class=&amp;quot;md-code lang-yaml&amp;quot;&amp;gt;name: Nightly smoke on: { schedule: [{ cron: &amp;#039;0 10 * * *&amp;#039; }], workflow_dispatch: {} } jobs:   smoke:     uses: mindattic/Unity.Multiplayer/.github/workflows/game-smoke.yml@main     secrets: inherit                    # UNITY_LICENSE, as GameCI needs&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;Defaults for both come from the game&amp;#039;s &amp;lt;code&amp;gt;mp-host.json&amp;lt;/code&amp;gt;, so the command line and the workflow stay bare:&amp;lt;br&amp;gt;&amp;lt;pre class=&amp;quot;md-code lang-json&amp;quot;&amp;gt;{ &amp;quot;bots&amp;quot;: &amp;quot;A,B&amp;quot;, &amp;quot;scenario&amp;quot;: &amp;quot;2&amp;quot; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The driver ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IBotDriver.RunAsync(NetBot bot)&amp;lt;/code&amp;gt; runs on the main thread after the bot has connected. &amp;lt;code&amp;gt;NetBot&amp;lt;/code&amp;gt; gives it:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Member&lt;br /&gt;
! What it is&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Session&amp;lt;/code&amp;gt;&lt;br /&gt;
| The bot&amp;#039;s connected &amp;lt;code&amp;gt;NetSession&amp;lt;/code&amp;gt; (roster, events, everything a player&amp;#039;s client has).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Role&amp;lt;/code&amp;gt;&lt;br /&gt;
| What &amp;lt;code&amp;gt;-bot&amp;lt;/code&amp;gt; said: &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;B&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scout&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;. One driver tells its bots apart by role.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Scenario&amp;lt;/code&amp;gt;&lt;br /&gt;
| What &amp;lt;code&amp;gt;-scenario&amp;lt;/code&amp;gt; said, or null. The library only passes it on; the server gets the same word (&amp;lt;code&amp;gt;NetBots.Scenario&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;JoinCode&amp;lt;/code&amp;gt;&lt;br /&gt;
| The code it joined by.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Pass(message)&amp;lt;/code&amp;gt;&lt;br /&gt;
| The run passed: logs &amp;lt;code&amp;gt;&amp;amp;#91;NetBot:&amp;amp;lt;role&amp;gt;] OK: message&amp;lt;/code&amp;gt;. The driver may keep playing (hold a block, keep a door open); the timeout no longer applies.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Fail(message)&amp;lt;/code&amp;gt;&lt;br /&gt;
| The run failed: logs &amp;lt;code&amp;gt;&amp;amp;#91;NetBot:&amp;amp;lt;role&amp;gt;] FAIL: message&amp;lt;/code&amp;gt;, cancels every wait, and a player quits with exit code 1. Throwing does the same, with the exception&amp;#039;s message.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;NextFrame()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Seconds(s)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Resume next frame, or after real seconds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Until(condition, what, timeout)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Resume once the condition holds; a &amp;lt;code&amp;gt;TimeoutException&amp;lt;/code&amp;gt; naming &amp;lt;code&amp;gt;what&amp;lt;/code&amp;gt; fails the run.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Spawned&amp;amp;lt;T&amp;gt;(match)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FindSpawned&amp;amp;lt;T&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FindAllSpawned&amp;amp;lt;T&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Replicated objects on this client that carry a &amp;lt;code&amp;gt;T&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;LocalPlayer&amp;amp;lt;T&amp;gt;()&amp;lt;/code&amp;gt;&lt;br /&gt;
| This bot&amp;#039;s own player object.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;Cancellation&amp;lt;/code&amp;gt;&lt;br /&gt;
| Cancelled when the run fails or times out.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Returning without &amp;lt;code&amp;gt;Pass&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Fail&amp;lt;/code&amp;gt; passes the run. Any wait after a failure throws &amp;lt;code&amp;gt;OperationCanceledException&amp;lt;/code&amp;gt;, so a driver never outlives its verdict.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Registering it.&amp;lt;/strong&amp;gt; Either mark a plain class &amp;lt;code&amp;gt;[NetBotDriver]&amp;lt;/code&amp;gt; (it needs a parameterless constructor; with IL2CPP and high stripping also mark it &amp;lt;code&amp;gt;[Preserve]&amp;lt;/code&amp;gt;), or put a component that implements &amp;lt;code&amp;gt;IBotDriver&amp;lt;/code&amp;gt; in the scene. A launch with none, or more than one, fails with a message saying so.&lt;br /&gt;
&lt;br /&gt;
== The launch line ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Argument&lt;br /&gt;
! On&lt;br /&gt;
! What it does&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-bot &amp;amp;lt;role&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| Makes the process a bot. &amp;lt;code&amp;gt;NetBootstrap&amp;lt;/code&amp;gt; starts nothing by itself and &amp;lt;code&amp;gt;NetFrontEnd&amp;lt;/code&amp;gt; builds no menus (Core&amp;#039;s &amp;lt;code&amp;gt;NetLaunch&amp;lt;/code&amp;gt;), even in a window.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-joincodefile &amp;amp;lt;path&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| Waits for the file and joins by the code in it.&lt;br /&gt;
|-&lt;br /&gt;
|  &lt;br /&gt;
| a server&lt;br /&gt;
| Writes every join code it publishes to the file, atomically.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-joincode &amp;amp;lt;code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| Joins by this code.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-address &amp;amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;-port &amp;amp;lt;n&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| With no code or code file: joins directly.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-scenario &amp;amp;lt;name&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| both&lt;br /&gt;
| Free text for the game: a level, a map, a mode.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-bottimeout &amp;amp;lt;s&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| Fails the run after this long (default 180).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;-playertoken &amp;amp;lt;t&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| a bot&lt;br /&gt;
| Its seat token; without one each bot launch gets a fresh token, so two bots from one build never take each other&amp;#039;s seat.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Everything else is read as usual: &amp;lt;code&amp;gt;-rendezvous&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-transport&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;-tickrate&amp;lt;/code&amp;gt;. A bot plays as &amp;lt;code&amp;gt;Bot &amp;amp;lt;role&amp;gt;&amp;lt;/code&amp;gt; in the roster. A typical pair:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-text&amp;quot;&amp;gt;Game.x86_64 -batchmode -nographics -mode server -rendezvous http&amp;amp;#58;//rendezvous:8080 -joincodefile /shared/code.txt -scenario 2&lt;br /&gt;
Game.x86_64 -batchmode -nographics -bot A -rendezvous http&amp;amp;#58;//rendezvous:8080 -joincodefile /shared/code.txt -scenario 2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A plain Linux player run with no display crashes in SDL&amp;#039;s default video driver. The smoke image sets &amp;lt;code&amp;gt;SDL_VIDEODRIVER=dummy&amp;lt;/code&amp;gt;, and so does the server package&amp;#039;s generated Dockerfile; set it yourself when you run a player headless anywhere else.&lt;br /&gt;
&lt;br /&gt;
== In-process tests: &amp;lt;code&amp;gt;NetBotTest&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Unity.Multiplayer.Testing.NetBotTest&amp;lt;/code&amp;gt; is the compose stack without Docker. It is a &amp;lt;code&amp;gt;NetSessionTest&amp;lt;/code&amp;gt; with a dedicated server and one client session per bot. &amp;lt;code&amp;gt;RunBots&amp;lt;/code&amp;gt; starts the bots first, which wait for the code file as they do in compose. It then starts the server with an in-process rendezvous service and the code file, and fails the test unless every bot passes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;public class CaptureTheFlagBots : NetBotTest&lt;br /&gt;
{&lt;br /&gt;
    public CaptureTheFlagBots() : base(bots: 2) { }&lt;br /&gt;
&lt;br /&gt;
    protected override string Scenario =&amp;gt; &amp;quot;ctf-2&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    protected override void OnSessionsCreated()&lt;br /&gt;
    {&lt;br /&gt;
        SetPlayerPrefab(Resources.Load&amp;amp;lt;GameObject&amp;gt;(&amp;quot;Runner&amp;quot;));&lt;br /&gt;
        Server.Started += () =&amp;gt; FlagRules.Serve(Server, Scenario);   // your server-side game code, on the fixture&amp;#039;s server&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    [UnityTest, Timeout(180000)]&lt;br /&gt;
    public IEnumerator BothRunnersCaptureTheFlag() =&amp;gt; RunBots(role =&amp;gt; new RunnerBot(), &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Bots&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Bot(&amp;quot;A&amp;quot;)&amp;lt;/code&amp;gt; give each &amp;lt;code&amp;gt;NetBotRunner&amp;lt;/code&amp;gt; afterwards (&amp;lt;code&amp;gt;State&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PassMessage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FailureReason&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt;). To check the server in between, use &amp;lt;code&amp;gt;StartServerAndBots&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;WaitForBots&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;BotTimeoutSeconds&amp;lt;/code&amp;gt; (default 120) bounds each bot&amp;#039;s run. The library&amp;#039;s own &amp;lt;code&amp;gt;NetBotTests&amp;lt;/code&amp;gt; and Unity.Cursory&amp;#039;s &amp;lt;code&amp;gt;BotEndToEndTests&amp;lt;/code&amp;gt; are examples to copy.&lt;br /&gt;
&lt;br /&gt;
Outside the fixture, &amp;lt;code&amp;gt;NetBotRunner.Run(gameObject, session, driver, new NetBotOptions { ... })&amp;lt;/code&amp;gt; runs one bot on any idle session, and &amp;lt;code&amp;gt;NetBots.WriteJoinCodes(session, path)&amp;lt;/code&amp;gt; makes any server write its codes to a file.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;mp-host game smoke&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
From the project folder (or &amp;lt;code&amp;gt;--project &amp;amp;lt;dir&amp;gt;&amp;lt;/code&amp;gt;), [[Unity.Multiplayer/articles/hosting#Deploy any game with one command (mp-host game)|mp-host]] does it all and exits 0 or 1:&lt;br /&gt;
&lt;br /&gt;
# Builds one StandaloneLinux64 player with the library&amp;#039;s own build method, &amp;lt;code&amp;gt;Unity.Multiplayer.Editor.BotPlayerBuild.BuildFromCommandLine&amp;lt;/code&amp;gt;, into &amp;lt;code&amp;gt;Builds/Smoke/player&amp;lt;/code&amp;gt;. The boot scene is mp-host.json&amp;#039;s &amp;lt;code&amp;gt;scene&amp;lt;/code&amp;gt;, else the first enabled Build Settings scene. It is a plain player, because GameCI has no Linux Dedicated Server support. The editor is found as &amp;lt;code&amp;gt;mp-host game&amp;lt;/code&amp;gt; finds it.&lt;br /&gt;
# Writes &amp;lt;code&amp;gt;Builds/Smoke/Dockerfile&amp;lt;/code&amp;gt; (Ubuntu, non-root, &amp;lt;code&amp;gt;SDL_VIDEODRIVER=dummy&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;Builds/Smoke/docker-compose.yml&amp;lt;/code&amp;gt;. The compose file holds the rendezvous service, &amp;lt;code&amp;gt;server&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-mode server -joincodefile /shared/join-code.txt&amp;lt;/code&amp;gt;) and one &amp;lt;code&amp;gt;bot-&amp;amp;lt;role&amp;gt;&amp;lt;/code&amp;gt; service per bot, sharing a volume. Read them, or run them by hand with &amp;lt;code&amp;gt;docker compose up&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Builds the rendezvous image from the Unity.Multiplayer checkout that &amp;lt;code&amp;gt;Packages/manifest.json&amp;lt;/code&amp;gt; points at (or &amp;lt;code&amp;gt;--multiplayer &amp;amp;lt;dir&amp;gt;&amp;lt;/code&amp;gt;; else &amp;lt;code&amp;gt;ghcr.io/mindattic/rendezvous&amp;lt;/code&amp;gt;), then builds the game image.&lt;br /&gt;
# Starts the stack with a fresh registration secret and reads the logs every 3 s. It passes once every bot has logged &amp;lt;code&amp;gt;&amp;amp;#91;NetBot:&amp;amp;lt;role&amp;gt;] OK:&amp;lt;/code&amp;gt;, and fails on any &amp;lt;code&amp;gt;FAIL:&amp;lt;/code&amp;gt; line or when the time runs out. The logs are kept in &amp;lt;code&amp;gt;Builds/Smoke/compose.log&amp;lt;/code&amp;gt; and the stack is torn down.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Option&lt;br /&gt;
! mp-host.json&lt;br /&gt;
! Default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--bots A,B&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;--bots 3&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;bots&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;A,B&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--scenario &amp;amp;lt;s&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;scenario&amp;lt;/code&amp;gt;&lt;br /&gt;
| none&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--server-args &amp;quot;&amp;amp;lt;args&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--bot-args &amp;quot;&amp;amp;lt;args&amp;gt;&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;server-args&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bot-args&amp;lt;/code&amp;gt;&lt;br /&gt;
| none&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--timeout &amp;amp;lt;s&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;smoke-timeout&amp;lt;/code&amp;gt;&lt;br /&gt;
| 300&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--skip-build&amp;lt;/code&amp;gt; (reuse &amp;lt;code&amp;gt;Builds/Smoke/player&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;--player &amp;amp;lt;dir&amp;gt;&amp;lt;/code&amp;gt; (a player built elsewhere)&lt;br /&gt;
|  &lt;br /&gt;
| build&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--keep&amp;lt;/code&amp;gt; (leave it running), &amp;lt;code&amp;gt;--dry-run&amp;lt;/code&amp;gt; (write the stack, run nothing), &amp;lt;code&amp;gt;--development&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--unity &amp;amp;lt;exe&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== The nightly workflow ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;.github/workflows/game-smoke.yml&amp;lt;/code&amp;gt; in Unity.Multiplayer is a reusable workflow. Its first job builds the player with GameCI (&amp;lt;code&amp;gt;BotPlayerBuild&amp;lt;/code&amp;gt;), and its second runs &amp;lt;code&amp;gt;mp-host game smoke --player ...&amp;lt;/code&amp;gt; from a checkout of Unity.Multiplayer. Inputs, all optional:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Input&lt;br /&gt;
! Default&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bots&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;scenario&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;server-args&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bot-args&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;timeout&amp;lt;/code&amp;gt;&lt;br /&gt;
| the game&amp;#039;s &amp;lt;code&amp;gt;mp-host.json&amp;lt;/code&amp;gt;, then the CLI&amp;#039;s defaults&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;project-path&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;siblings&amp;lt;/code&amp;gt;&lt;br /&gt;
| none; repos (&amp;lt;code&amp;gt;owner/name&amp;lt;/code&amp;gt;) checked out beside the game for &amp;lt;code&amp;gt;file:../../&amp;amp;lt;name&amp;gt;&amp;lt;/code&amp;gt; package references&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;unity-version&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;auto&amp;lt;/code&amp;gt; (ProjectVersion.txt)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;multiplayer-ref&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Secrets: &amp;lt;code&amp;gt;UNITY_LICENSE&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;UNITY_EMAIL&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;UNITY_PASSWORD&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;UNITY_SERIAL&amp;lt;/code&amp;gt;) for GameCI, and &amp;lt;code&amp;gt;MINDATTIC_REPOS_TOKEN&amp;lt;/code&amp;gt; when Unity.Multiplayer or a sibling is private. &amp;lt;code&amp;gt;tools/set-ci-secrets.ps1&amp;lt;/code&amp;gt; sets them; see [[Unity.Multiplayer/articles/ci-secrets|CI secrets]]. &amp;lt;code&amp;gt;compose.log&amp;lt;/code&amp;gt; is uploaded as the &amp;lt;code&amp;gt;smoke-logs&amp;lt;/code&amp;gt; artifact.&lt;br /&gt;
&lt;br /&gt;
The package&amp;#039;s own nightly (&amp;lt;code&amp;gt;nightly-smoke.yml&amp;lt;/code&amp;gt;, the Minimal sample&amp;#039;s &amp;lt;code&amp;gt;SmokeDriver&amp;lt;/code&amp;gt;) predates this and still drives its roles through environment variables. It stays that way for now. The reusable workflow builds a project that is already in the repo, and the package&amp;#039;s generic game, the New Game template, only becomes a project once the wizard has run. Locally, &amp;lt;code&amp;gt;tests/run-new-game.ps1 -Smoke&amp;lt;/code&amp;gt; runs &amp;lt;code&amp;gt;mp-host game smoke&amp;lt;/code&amp;gt; on a freshly generated game. New games use the above.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[Unity.Multiplayer]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/Unity.Multiplayer/blob/main/docs/articles/bots.md Unity.Multiplayer/docs/articles/bots.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Unity.Multiplayer]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>