Search Unity

  1. We have added dedicated sub-forums for UNet, the experimental MLAPI and Unity Transport Package. Please use the new forums to discuss related topics.
    Dismiss Notice
  2. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

photonNetwork instantiate shows objects only on the Master screen

Discussion in 'Multiplayer' started by ilayasayag, Jul 20, 2021.

  1. ilayasayag

    ilayasayag

    Joined:
    Jul 20, 2021
    Posts:
    2
    hello everyone :)
    I'm a new Unity developer who is currently creating his second game in this platform and a first time user of Photon Pun 2 engine.

    my problem is this:
    I craeted a card game in unity and now I'm trying to create the multiplayer version.
    whenever I try to instaniate a new card in the game the Prefab of the card is visible only on one screen. the same goes for visability of buttons and extras. I don't really know if it is a visibilty problem or even two seprated screens problem but I searched out the internet and didnt found anyone with a solution

    this is how I try to create the card
    GameObject dealcard = PhotonNetwork.Instantiate(cardprefab.name, vector3, Quaternion.identity,0);

    I think its important to say that my cardprefab is located in Resources folder and has a PhotonView Component
     
  2. ilayasayag

    ilayasayag

    Joined:
    Jul 20, 2021
    Posts:
    2
    Importand Update!!
    after an awful couple of days after sending this question I had a breakthrow and now I know what is my problem - I initiate the card back to be the same as all the cards and change the card face to be random like I want but when I looked at the other device I see that the card face is Null and not what I wanted for some reason

    is it a sync problem? how can I manage to change the object on the other screen?
     
unityunity