MonoBehaviour.OnConnectedToServer 当连接到服务器

function OnConnectedToServer () : void

Description描述

Called on the client when you have successfully connected to a server

当你成功连接到服务器时,在客户端调用。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnConnectedToServer() {
		Debug.Log("Connected to server");
	}
}
function OnConnectedToServer() {
	Debug.Log("Connected to server");
	// Send local player name to server ...
	//发送本地玩家名到服务器
}
Page last updated: 2011-1-2