Version: 2017.3
Method group is Obsolete

NetworkView.viewID

切换到手册
Obsolete public NetworkViewID viewID ;

描述

该网络视图的 ViewID。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnNetworkInstantiate(NetworkMessageInfo info) { NetworkView[] networkViews = GetComponents<NetworkView>(); Debug.Log("New prefab network instantiated with views - "); foreach (NetworkView view in networkViews) { Debug.Log("- " + view.viewID); } } }