Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party 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:
    4
    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:
    4
    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?