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);
}
Page last updated: 2011-3-30