成功连接到服务器后在客户端上调用。
using UnityEngine; using System.Collections;public class ExampleClass : MonoBehaviour { void OnConnectedToServer() { Debug.Log("Connected to server"); // Send local player name to server ... } }