NetworkView.isMine 是否该物体控制

var isMine : bool

Description描述

Is the network view controlled by this object?

这个网格视是由这个物体控制吗?

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnNetworkInstantiate(NetworkMessageInfo info) {
	if (networkView.isMine)
		Debug.Log("New object instanted by me");
	else
		Debug.Log("New object instantiated by " + info.sender);
	}
}
function OnNetworkInstantiate (info : NetworkMessageInfo) {
if (networkView.isMine)
	Debug.Log("New object instanted by me");
else
	Debug.Log("New object instantiated by " + info.sender);
}
Page last updated: 2011-3-30