Search Unity

how to get an object by the NetworkInstanceId on the client side?

Discussion in 'Multiplayer' started by craig4android, Nov 7, 2020.

  1. craig4android

    craig4android

    Joined:
    May 8, 2019
    Posts:
    124
    how to get an object by the NetworkInstanceId on the client side?

    And is it possible to get a list of Objects belonging to certain client?
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Sounds like you are using UNET?
    I believe there was FindObjectByNetId function somewhere in NetworkServer or NetworkClient.

    If you use Mirror then you can use NetworkIdentity.spawned[netId] :)
     
    craig4android likes this.