Search Unity

networkView.isMine equivalent in UNET?

Discussion in 'UNet' started by massaiTHEdog, Apr 3, 2016.

  1. massaiTHEdog

    massaiTHEdog

    Joined:
    Nov 16, 2012
    Posts:
    26
    Hi,
    In my project, when I spawn it creates the local player (Normal).
    From this player, I create another gameObject and set his Client Authority to be the same as the owner of the player.
    My question is:
    How can I know on a script on the object if the current client is the owner?

    isLocalPlayer is not working as it is not.
    I would like to know the equivalent of networkView.isMine.

    Thanks!
     
    Bioinformatizer likes this.
  2. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
  3. massaiTHEdog

    massaiTHEdog

    Joined:
    Nov 16, 2012
    Posts:
    26
    Thank you!
    The problem was that I wasn't using the OnStartAuthority... :p