Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

How to update variables on an object via their photonView ID

$
0
0
I was to create an PunRPC that broadcasts a photonview id and some variable updates.

I can't work out how to convert a photonview reference into something where I can see the attached game objects variables to edit.

The game object has public variables I want to update (floats and bools)

My last attempt was:


[PunRPC]
public void AIAttack(int enemy)
{
PhotonView target = PhotonView.Find(enemy);

// This is not seen as a valid variable to update
target.gameObject.dead = true;



Viewing all articles
Browse latest Browse all 15755

Trending Articles