public void ChangeSupport(int interactiveID, int newSupportID) { InteractiveHandle go = PhotonView.Find(interactiveID).gameObject.GetComponent <InteractiveHandle> (); MonoBehaviourPun s = PhotonView.Find(newSupportID).gameObject.GetComponent <MonoBehaviourPun> (); //print ("ChangeSupport of object " + go.name + " to " + s.name); go.SetSupport(s); }
public void RemoveSupport(int interactiveID) { var pv = PhotonView.Find(interactiveID); if (pv) { InteractiveHandle go = pv.gameObject.GetComponent <InteractiveHandle> (); //print ("RemoveSupport of object " + go.name); if (go) { go.RemoveSupport(); } } }