Class WidgetConfiguration
The WidgetConfiguration is a ScriptableObject that contains the configuration for a session.
Inherited Members
Namespace: Unity.Multiplayer.Widgets
Assembly: Unity.Multiplayer.Widgets.Core.dll
Syntax
[CreateAssetMenu(fileName = "WidgetConfiguration", menuName = "Multiplayer/Widgets/WidgetConfiguration")]
public class WidgetConfiguration : ScriptableObject
Fields
EnableVoiceChat
A flag to determine if the player should join the voice channel when joining the session.
Declaration
[FormerlySerializedAs("JoinVoiceChannel")]
[Header("Voice Settings")]
[Tooltip("Automatically join a voice channel for a session when joining the session.")]
public bool EnableVoiceChat
Field Value
Type | Description |
---|---|
bool |
ListenIpAddress
Listen for incoming connection at this address.
Declaration
[FormerlySerializedAs("IpAddress")]
[Tooltip("Listen for incoming connection at this address. This is the local IP address that the host should use. To listen on all interfaces Use 0.0.0.0 when using ConnectionMode.Publish. For a Listen connection the default allows for local testing.")]
public string ListenIpAddress
Field Value
Type | Description |
---|---|
string |
MaxPlayers
The maximum number of players that can join the session.
Declaration
[Header("Session Settings")]
public int MaxPlayers
Field Value
Type | Description |
---|---|
int |
Name
The name of the session to create or join.
Declaration
public string Name
Field Value
Type | Description |
---|---|
string |
Port
The port number defaults to 0 which selects a randomly available port on the machine and uses the chosen value as the publish port. If a non-zero value is used, the port number applies to both listen and publish addresses.
Declaration
[Tooltip("0 selects a randomly available port on the machine and uses the chosen value as the publish port. If a non-zero value is used, the port number applies to both listen and publish addresses.")]
public int Port
Field Value
Type | Description |
---|---|
int |
PublishIpAddress
Address that clients should use when connecting.
Declaration
[Tooltip("Address that clients should use when connecting. This is the external/public IP address that clientsshould use as the publishIp.")]
public string PublishIpAddress
Field Value
Type | Description |
---|---|
string |
connectionMode
Choose between a local (Listen) or public (Publish) connection.
Declaration
[Header("Direct Connection Settings")]
public ConnectionMode connectionMode
Field Value
Type | Description |
---|---|
Connection |
connectionType
The type of connection to use when creating or joining a session.
Declaration
[Header("Multiplayer Services Settings")]
[Header("Connection Settings")]
public ConnectionType connectionType
Field Value
Type | Description |
---|---|
Connection |