How to assign Photon Instantiated object's public functions to a gui button

Options
I am doing all my movement stuff using ui buttons but i came up with a problem that, after Photon Instantiating the player the prefab and its button assigned functions looses connections with the button in the scene.

What I am trying to say is;
http://ististudio.com/ssforphoton/issue1.png
this is the button and its connections with player's prefab functions but the issue is even if the players gets instantiated by photon button's connections are staying with the prefab. Its not getting connected to the instantiated prefab which is in the scene.

Comments

  • Tobias
    Options
    Unity will call Awake() in any instantiated game object. You can write a script to assign itself to a button, if it's "your gameobject", if needed.