I'm developing a network based multiplayer board game, and the major issue I'm currently having is being able to send RPC calls to specific players to essentially "enable" or "disable" their current turn.
I've researched the majority of the multiplayer examples out there but still have come up short on how to pull the internal multiplayer ID out for X player. My current build is essentially hot-seat playability, but that was never the overall goal of the project, so very lost at the moment.
Is there a way to RPC call player 2 specifically? Networkview? I've tried many things mostly resulting in errors in the compiler. Most multiplayer examples seem to be set up for all players being active at the same time (FPS,Racing,ect).
Any help on the command to pull a specific player ID would be extremely appreciated!
I just took a few hours to try to solve this problem, and I believe I found the answer here: http://unity3d.com/support/documentation/ScriptReference/NetworkPlayer.html in the function ToString. This was not immediately obvious, as it seemed like it would be a variable called playerID or something. More importantly, it was impossible to search the scripting reference for because there are a million ToString functions. This is the code I used to test this function on the client:
void OnConnectedToServer() {
print("Player ID is " + Network.player.ToString());
}