NetworkView.observed 监控
var observed : Component
Description描述
The component the network view is observing.
网络视图监控的组件。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void PrintNames(NetworkViewID[] viewIDs) {
foreach (NetworkViewID ID in viewIDs) {
Debug.Log("Finding " + ID);
NetworkView view = NetworkView.Find(ID);
Debug.Log(view.observed.name);
}
}
}
// Print the names of the objects which have the view IDs given in the array
//打印数组中含有给出的viewID的对象的名称
function PrintNames(viewIDs : NetworkViewID[]) {
for (var ID : NetworkViewID in viewIDs) {
Debug.Log("Finding " + ID);
var view : NetworkView = NetworkView.Find(ID);
Debug.Log(view.observed.name);
}
}
最后修改:2011年3月30日 Wednesday 16:12