send NetworkPlayer via RPC

hi guys,

i want to send client’s NetworkPlayer with other parameters to all clients via RPC with this code:

networkView.RPC("info_player", RPCMode.AllBuffered, room_name, Network.player);

and this is “info_player” RPC function :

    void info_player(string room, NetworkPlayer info)
        if (room == room_name)

but when i print ip address ‘print(info.ipAddress)’ console print empty (nothing) :frowning:

where is ip address :o

i need help please

I’m not sure why it’s not working but If you were trying to get the info of the sender there’s a simpler way
Just add the parameter “NetworkMessageInfo x” as the last parameter in the [RPC] function
void info_player(string room, NetworkMessageInfo info)

from the info variable you can get the sender via info.sender

That’s written in the documentation here:
Let me know if you need more help :slight_smile: