Nebula
Bootstrap

EditorRunPlan

The decision for one Editor process in the Multiplayer Play Mode dev loop, and the settings it implies.

generated from the sources
public readonly struct EditorRunPlan

The decision for one Editor process in the Multiplayer Play Mode dev loop, and the settings it implies.

Fields

ServerTag

public const string ServerTag = "Server";

A virtual player with this tag (any case) hosts the server; one with ClientTag is a client. Untagged, the main Editor is a client, the active virtual player with the lowest index hosts the server, and every other virtual player is a client. When any active player is tagged Server, untagged virtual players are clients, and when several are, only the one with the lowest index hosts: the others are clients and log an error.

ClientTag

public const string ClientTag = "Client";

A player with this tag is always a client and never hosts, whatever its index.

Properties

Player

public EditorPlayer Player { get; }

Roles

public NebulaRoles Roles { get; }

The roles this process runs; NebulaRoles.None for EditorPlayer.Mesh, which keeps the usual rule.

Warning

public string Warning { get; }

Why the plan is EditorPlayer.Mesh when the mode asked for more; null otherwise.

Error

public string Error { get; }

Set when the tags ask for more than one server: this player was tagged ServerTag but another active player with a lower index hosts, so this one is a client. Null otherwise.

HidesGameView

public bool HidesGameView { get; }

Whether this Editor closes its Game view while it plays: true only for the server when a virtual player hosts it, never for the main Editor or a client. The Game view builds the render pipeline each time it draws, whatever the cameras do, and a virtual player that cannot build the pipeline logs errors every frame. The Editor puts a Nebula Server tab in the Game view's place.

Methods

Resolve

public static EditorRunPlan Resolve(NebulaEditorRunMode mode, bool isEditor, bool playModeAvailable, bool isMainEditor, IReadOnlyList<string> tags, bool explicitRole);
public static EditorRunPlan Resolve(NebulaEditorRunMode mode, bool isEditor, bool playModeAvailable, bool isMainEditor, IReadOnlyList<string> tags, bool explicitRole, EditorRoster roster);
ParameterDescription
modeThe configured NebulaConfig.EditorRunMode.
isEditorWhether this process is the Unity Editor. A build is always EditorPlayer.Mesh.
playModeAvailableWhether Multiplayer Play Mode's CurrentPlayer could be read.
isMainEditorWhether this is the main Editor rather than a virtual player.
tagsThis player's Multiplayer Play Mode tags; null or empty for none.
explicitRoleWhether -nebula-role was given, which always wins.

ApplyTo

public void ApplyTo(NebulaConfig config, Func<string, bool> hasArg, string projectRoot);

Apply the plan's settings to config (the bootstrap's copy, never the asset). A setting whose command-line switch was given (hasArg, without the leading dash) keeps the command line's value. Does nothing for EditorPlayer.Mesh.

ParameterDescription
projectRootThe project's root folder, from EditorDevPaths.ProjectRoot: the dev loop's files live under its Library/Nebula.

ToString

public override string ToString();

On this page