NetworkView.owner 所有者
var owner : NetworkPlayer
Description描述
The NetworkPlayer who owns this network view.
谁拥有这个网络视图的NetworkPlayer。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnNetworkInstantiate(NetworkMessageInfo info) {
if (!networkView.isMine)
Debug.Log("New object instantiated by " + networkView.owner);
}
}
function OnNetworkInstantiate (info : NetworkMessageInfo) {
if (!networkView.isMine)
Debug.Log("New object instantiated by " + networkView.owner);
}
最后修改:2011年3月30日 Wednesday 16:48