Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Third Party [Please Explain:] PUN - PhotonView

Discussion in 'Multiplayer' started by ExbowFTW, Jun 23, 2015.

  1. ExbowFTW

    ExbowFTW

    Joined:
    May 2, 2015
    Posts:
    281
    So I've been following a Unity 3D Multiplayer PUN (Photon Unity Network) tutorial. Now, in the tutorial he uses Photon View to make sure that component is watched by the network, so that everyone can see the script doing what it has to do.

    But in one case, he drags in the component PhotonView, and then adds some important components into the "Observed Components" section of Photon View.
    Yet in another case, he drags in PhotonView, but doesn't add anything to the "Observed Components", saying that it's going to Observe the whole GameObject. Is that true... if you leave Observe Components blank it will observe every component part of that gameObject???

    It may help if someone explains PhotonView a little more so I get a grasp of how to use it more...

    Thank you!
    Exbow
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,076
    A PhotonView without any observed component will not sync anything. That is not correct. However, it can be the target of RPCs, so maybe in his case, things worked out without observing anything,
     
  3. ExbowFTW

    ExbowFTW

    Joined:
    May 2, 2015
    Posts:
    281
    Ohhhhhhh that makes sense... he was using RPCs... Okay thanks :D