Class ClientServerBootstrap
Inheritance
ClientServerBootstrap
Syntax
[Preserve]
public class ClientServerBootstrap : ICustomBootstrap
Fields
AutoConnectPort
The default port to use for auto connection. The default value is zero, which means do not auto connect.
If this is set to a valid port any call to CreateClientWorld - including CreateDefaultWorlds and Initialize -
will try to connect to the specified port and address - assuming DefaultConnectAddress is valid.
Any call to CreateServerWorld - including CreateDefaultWorlds and Initialize - will listen on the specified
port and listen address.
Declaration
public static ushort AutoConnectPort
Field Value
DefaultConnectAddress
The default address to connect to when using auto connect (AutoConnectPort is not zero).
If this valud is NetworkEndPoint.AnyIpv4 auto connect will not be used even if the port is specified.
This is to allow auto listen without auto connect.
The address specified in the Multiplayer PlayMode Tools takes precedence over this when running in the editor,
if that address is not valid or you are running in a player DefaultConnectAddress will be used instead.
An invalid DefaultConnectAddress will disable auto connect even if the address in Multiplayer PlayMode Tools is valid.
Declaration
public static NetworkEndPoint DefaultConnectAddress
Field Value
DefaultListenAddress
The default address to listen on when using auto connect (AutoConnectPort is not zero).
Declaration
public static NetworkEndPoint DefaultListenAddress
Field Value
Properties
DefaultWorldSystems
Declaration
public static List<Type> DefaultWorldSystems { get; }
Property Value
ExplicitDefaultWorldSystems
Declaration
public static List<Type> ExplicitDefaultWorldSystems { get; }
Property Value
RequestedPlayType
Declaration
public static ClientServerBootstrap.PlayType RequestedPlayType { get; }
Property Value
Methods
CreateClientWorld(World, String, World)
Declaration
public static World CreateClientWorld(World defaultWorld, string name, World worldToUse = null)
Parameters
Returns
CreateDefaultClientServerWorlds(World)
Utility method for creating the default client and server worlds based on the settings
in the playmode tools in the editor or client / server defined in a player.
Can be used in custom implementations of Initialize.
Declaration
public virtual void CreateDefaultClientServerWorlds(World defaultWorld)
Parameters
| Type |
Name |
Description |
| World |
defaultWorld |
|
CreateDefaultWorld(String, World)
Utility method for creating the default way when bootstrapping. Can be used in
custom implementations of Initialize to generate systems lists and populate the
default world. If the world parameter specified that world will be used and
populated with systems instead of creating a new one.
Declaration
public World CreateDefaultWorld(string defaultWorldName, World world = null)
Parameters
| Type |
Name |
Description |
| String |
defaultWorldName |
|
| World |
world |
|
Returns
CreateServerWorld(World, String, World)
Declaration
public static World CreateServerWorld(World defaultWorld, string name, World worldToUse = null)
Parameters
Returns
GenerateSystemLists(IReadOnlyList<Type>)
Declaration
protected static void GenerateSystemLists(IReadOnlyList<Type> systems)
Parameters
GetSystemAttribute<T>(Type)
Declaration
protected static T GetSystemAttribute<T>(Type systemType)
where T : Attribute
Parameters
| Type |
Name |
Description |
| Type |
systemType |
|
Returns
Type Parameters
Initialize(String)
Declaration
public virtual bool Initialize(string defaultWorldName)
Parameters
| Type |
Name |
Description |
| String |
defaultWorldName |
|
Returns
Implements