Every setting you can give a multiplayer session is a public field on one of a few classes. This page lists them all: name, type, default and the line of the declaration. It does not repeat how the pieces fit. For that, read Seats, joining and waiting and Security notes.
The Multiplayer add-on compiles on Unity 6000.0 and 6000.6. Two players were tested on 6000.0 (an editor host and a development player); not yet on 6000.6, over Relay or with IL2CPP.
You make a HostSettings or a ClientSettings object, fill it, and give it to MultiplayerSession.StartHost or MultiplayerSession.StartClient. Both classes derive from SessionSettings. With Netcode for GameObjects you can instead fill the Netcode Session component and call its StartHost() or StartClient(); the component builds the settings objects for you.
With a transport of your own, call settings.UseTransport(transport) after you set everything else. It returns false, and changes nothing, when the transport is null, its role does not match the settings (a host needs IsServer true, a client false), or its packets are smaller than 256 bytes plus the header. Otherwise it lowers SliceBytes to fit, raises BytesPerFrame to at least one slice, and stores the transport. See Bring your own transport.
Example, not compiled. The member names come from the declarations below.
var host =new HostSettings
{
MaxPlayers =3,
Password ="a long phrase",
JoinActors =JoinActorRule.ListedOnly,
};
host.PlayableActors.Add("aldric"); // an actor ID of your database
Message bytes per slice on the wire. UseTransport lowers it to fit the transport.
119
Window
int
16
Slices sent and not yet acknowledged, per connection.
122
BytesPerFrame
int
64 * 1024
Bytes handed to the transport per connection and frame.
125
KeepAliveSeconds
double
2
Seconds without anything sent before a keep-alive goes out.
128
TimeoutSeconds
double
15
Seconds without anything received before the connection counts as lost.
131
SceneActorIds
List<string>
null
The scene actor IDs the content hash uses. Null: the scene actors registered when the session starts.
134
Clock
Func<double>
null
Source of real seconds for keep-alives, timeouts and rate limits. Null: a stopwatch.
137
AssetTable
AssetTable
null
The asset table. Both machines must use the same one. Null: assets travel by type and name, and every Signal is heard on the host only.
181
SessionSettings also has a read-only Transport, set by UseTransport or by the NGO adapter, and the constant PacketHeaderBytes. The session does not start without a transport.
The default. A living character nobody plays (only a listed one when PlayableActors lists any). Schemes already running in which another player takes part stay hidden from the newcomer for good; the newcomer’s character answers those dialogues as an NPC.
ListedOnly
As Free, but only the characters PlayableActors lists. Nobody while it is empty.
AnyFree
Any character nobody plays, dead or alive. Nothing is withheld, so the player sees every scheme that character takes part in. The least safe choice.
A player who returns with a seat key always gets their own seat back, whatever this says. sources: SessionSettings.cs (the enum and its comments).
What the host shows on the players’ machines. It is a field of HostSettings, so you reach it as hostSettings.Presentation. sources: Runtime/Presentation/PresentationHost.cs.
SeatPolicy is a class you derive from. Set HostSettings.Policy to your instance. Each method runs on the host, on the main thread, and a policy that throws refuses the player. sources: Runtime/Session/SessionSettings.cs, lines 518 to 604.
Method
Default answer
virtual bool AllowAccomplices(int seat, Actor conspirator, IReadOnlyList<Actor> accomplices)
True only for an empty list: no accomplices from a player’s machine at all.
virtual bool AllowTrigger(int seat, Actor player, Scheme run, string triggerName)
True only when the player’s character is the run’s Conspirator. Asked only when AllowClientTriggers is on and the graph waits for that name.
virtual bool AllowStart(int seat, Actor conspirator, Scheme scheme, Actor target)
False for a scheme the player’s lists do not show (Show in lists is Never, or its conditions are not met for conspirator and target), true otherwise. The host reads the conditions as that player’s own view has the world. Asked before the requirements.
virtual bool AllowJoin(JoinRequest request)
True for a rejoin; for a new player, the answer of JoinActors and PlayableActors (request.ActorAllowed).
virtual string Identify(JoinRequest request)
An empty text: not identified.
Whatever a policy answers, a client never names a character another human plays as an accomplice and never acts for a character it does not play. A JoinRequest carries ActorId, Rejoin, Claim, Seat, Address, Language, TransportIdentity, IdentityToken, Identity, SeatIdentity, ActorAllowed, ActorRefusal and a settable Refusal (the words the player sees). IdentityToken is unchecked; do not trust it until your own code has.
Settings of the NGO adapter. You pass them to NetcodeSession.StartHost(manager, settings, options) or NetcodeSession.StartClient(manager, settings, options). Both calls take the options as an optional last argument. The adapter compiles only when NGO is installed. Set the transport’s address and port first (UnityTransport.SetConnectionData), as the XML comment of NetcodeSession.StartHost says. sources: Netcode/NetcodeTransport.cs, Netcode/NetcodeWire.cs, Netcode/NetcodeSession.cs.
Intrigues / Multiplayer / Netcode Session is the class NetcodeSessionStarter. Its fields show in the inspector under the names Unity makes from the field names (startOnPlay becomes Start On Play). sources: Netcode/NetcodeSessionStarter.cs.
Field
Default
Notes
networkManager
empty
Empty: NetworkManager.Singleton. (line 49)
address
127.0.0.1
The host’s address a client connects to. (53)
port
7777
Host listens and client connects here. (57)
listenAddress
empty
Empty: every IPv4 interface. Use 127.0.0.1 for this machine only. (61)
The README says host and players must run the same add-on version, “protocol 14”. The code declares protocol version 15 (Protocol.Version, Runtime/Protocol/Messages.cs line 251). Trust the code.
The README says a Unity 6 run has not happened. The add-on note at the top of this page is the wording this site uses, and it comes from one place only.