NetworkView.Find 查找
static function Find (viewID : NetworkViewID) : NetworkView
Description描述
Find a network view based on a NetworkViewID.
基于NetworkViewID查找一个网络视图。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void PrintNames(ArrayList 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
// 打印物体的名称,这些物体具有数组中给定的视图ID
function PrintNames(viewIDs : Array) {
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 17:21