Search Unity

NetworkMessageInfo.sender equivalent in HLAPI?

Discussion in 'Multiplayer' started by tinman, Oct 19, 2015.

  1. tinman

    tinman

    Joined:
    Jan 8, 2011
    Posts:
    229
    I have a bunch of gameObjects on the server which are linked to a users connectionID in a list. When a player sends the server a command "Please spawn my object", I need to check through all the gameObjects and spawn the object which belongs to that connection. With the legacy system I could simply check NetworkMessageInfo.sender for this. Is there an equivalent in the HLAPI?
    I was going to use
    GetComponent<NetworkIdentity>().connectionToClient
    and
    GetComponent<NetworkIdentity>().connectionToServer
    but these aren't the same values