Version: 2017.1
Method group is Obsolete

NetworkView.isMine

切换到手册
Obsolete public bool isMine ;

描述

网络视图是否由该对象控制?

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnNetworkInstantiate(NetworkMessageInfo info) { NetworkView nView = GetComponent<NetworkView>(); if (nView.isMine) Debug.Log("New object instanted by me"); else Debug.Log("New object instantiated by " + info.sender); } }