first script i wrote:
PgPv.RPC(“ricevegun”, RpcTarget.All,Pv.ViewID);//in this case PgPv is Photonview of second script,Pv is photonwiew of first script//
in a second script i wrote:
[PunRPC]
public void ricevegun(int GunId)
{
Gun = Pv.Find(GunId).gameObject;
Gun.transform.SetParent(Hand);
}//this case Pv is second script PhotonView//
and unity gave me erorr:
Member ‘PhotonView.Find(int)’ cannot be accessed with an instance reference; qualify it with a type name instead
Find()
is a static function. change your calls to PhotonView.Find()
just as the error message already tells you.