Working with Unity

Multiplayer clones

Run up to three clones beside the primary editor, each with its own stream, console and input, without building a player.

Ownership, prediction, join order and disconnects need real clients. Satura Space gives you up to four players, the primary editor plus three clones, streaming side by side, without a player build, several copies of the project or alt-tabbing.

The primary editor and three clones.

What a clone is

Each extra player is a real hidden Unity editor that shares your Assets, Packages and Library, so nothing re-imports and a clone boots in seconds. Each has its own stream, console and input.

  • One Play button starts the whole group.
  • The primary's hot reload and scene changes reach all of the clones.
  • Clones are always hidden windows. They don't have their own Unity mode.
  • A Tuner never opens on a clone; it opens on the primary editor or a scratchpad.

Add and remove players

Add a player from the Unity Player panel, or let an agent do it with unity.addPlayer(). Players are added in Edit Mode, and the first one can take minutes to set up. unity.removePlayer() removes the last one.

Player numbers match the panels.

Agents drive every player

An agent adds players and enters Play Mode on all of them in one satura_exec script. Your handles then run on one player or on every player:

[SaturaHandle("Jumps, and returns the height reached")]
public static float Jump() { ... }
await unity.addPlayer()
await unity.play('Assets/Scenes/Arena.unity')
return await handles.call('Jump', { player: 'all' })

{ player: 'all' } starts every player at the same wall-clock moment, and each player reports its own result. SaturaHandles.PlayerIndex tells a handle which player it is: the panel number minus one.

The agent reads the results, fixes what broke and runs the match again. Its report shows you the recorded match.

An agent can also run C# on all players at once with unity.exec(code, { player: 'all' }), or on one with { player: 2 }. A runtime change like that is gone on Stop.

Modes

Multiplayer works in Normal and Headless Graphics. Headless NoGraphics is single-player only.

On a scratchpad

Each scratchpad has its own multiplayer group, separate from your project's.

Limits

Clones are editors. For logic and netcode bugs they mostly replace a player build, but test an IL2CPP build on target hardware before you ship.