var networkView : NetworkView
Description描述
The NetworkView attached to this GameObject (Read Only). (null if there is none attached)
NetworkView附加到GameObject(游戏物体)(只读)(如无附加则为空)。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
networkView.RPC("MyFunction", RPCMode.All, "someValue");
}
}
networkView.RPC("MyFunction", RPCMode.All, "someValue");