Search Unity

Third Party PhotonView viewID on child of prefab not getting set!

Discussion in 'Multiplayer' started by Reid_Taylor, May 31, 2021.

  1. Reid_Taylor

    Reid_Taylor

    Joined:
    Oct 9, 2019
    Posts:
    57
    I have a character prefab with a photon view that I instantiate using
    Code (csharp):
    1. PhotonNetwork.Instantiate
    and the players viewId is set correctly... But then I have a gun with a photon view as a child of the player. For some reason that PhotonView doesn't get set? Whats wrong?
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,066
    Is the gun part of the prefab? It must be present when the object is being instantiated, then it should get a viewID assigned.