Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

NetworkTransport.ConnectAsNetworkHost

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual
public static function ConnectAsNetworkHost(hostId: int, address: string, port: int, network: Networking.Types.NetworkID, source: Networking.Types.SourceID, node: Networking.Types.NodeID, out error: byte): void;
public static void ConnectAsNetworkHost(int hostId, string address, int port, Networking.Types.NetworkID network, Networking.Types.SourceID source, Networking.Types.NodeID node, out byte error);

Parámetros

hostId Id of udp socket used to establish connection.
address Ip4.
port Port.
network Guid of relay network.
source Guid of user.
error Possible error (NetworkError.Ok if success).
node Slot id for this user.

Descripción

Create dedicated connection to relay server.

Client calls this function to set itself as an owner of the network group on the relay server. This client should call ReceiveRelayEventFromHost periodically to be notified about connection/disconnection events to/from Relay server.