Class NetEnvironment
- Namespace
- Unity.Multiplayer.Core
Reads join-code settings from environment variables onto a NetConfig: how a container or a hosting provider hands a dedicated server its rendezvous URL and secret without putting the secret on a command line other processes can read. Applied before the command line, so an argument still wins.
public static class NetEnvironment
- Inheritance
-
NetEnvironment
- Inherited Members
Remarks
MINDATTIC_RENDEZVOUS_URL | RendezvousUrl. |
MINDATTIC_RENDEZVOUS_SECRET | RendezvousSecret. |
MINDATTIC_PUBLIC_ADDRESS | PublicAddress. |
MINDATTIC_SERVER_PASSWORD | Password. |
Unset or empty variables change nothing. RunPod's own RUNPOD_PUBLIC_IP and RUNPOD_TCP_PORT_* are
read later, by For(NetConfig, Func<string, string>).
Fields
PublicAddressVariable
Environment variable for PublicAddress.
public const string PublicAddressVariable = "MINDATTIC_PUBLIC_ADDRESS"
Field Value
RendezvousSecretVariable
Environment variable for RendezvousSecret.
public const string RendezvousSecretVariable = "MINDATTIC_RENDEZVOUS_SECRET"
Field Value
RendezvousUrlVariable
Environment variable for RendezvousUrl.
public const string RendezvousUrlVariable = "MINDATTIC_RENDEZVOUS_URL"
Field Value
ServerPasswordVariable
Environment variable for Password.
public const string ServerPasswordVariable = "MINDATTIC_SERVER_PASSWORD"
Field Value
Methods
Apply(NetConfig, Func<string, string>)
Applies every set variable to config.
public static void Apply(NetConfig config, Func<string, string> environment = null)
Parameters
configNetConfigThe config to fill.
environmentFunc<string, string>Reads a variable (null when unset); null reads the process environment.
Exceptions
- ArgumentNullException
configis null.