Unity Community |

Hello,
I'm trying to use networkView.group to clear some part of my code but I think I didn't understand how it's works .... (and the documentation is a little lite http://docs.unity3d.com/Documentatio...iew-group.html )
There's my Client code
Code:
using UnityEngine; using System.Collections; int selectedGroup; bool connected = false; { if( !connected ) { { selectedGroup = 11; connectToServer(); } { selectedGroup = 12; connectToServer(); } } else { { } } } void connectToServer() { } { connected = true; networkView.group = selectedGroup; int forbidengroup; { forbidengroup = 12; } else { forbidengroup = 11; } { } } { connected = false; } public const string RPC_MOVE = "rpcMove"; void rpcMove( int playergroup ) { } }
And my server code
Code:
using UnityEngine; using System.Collections; // Use this for initialization } // Update is called once per frame } public const string RPC_MOVE = "rpcMove"; { networkView.group = playergroup; if( playergroup == 11 ) { } else { } } { } }
The idea is : if a client is in group 11, and send the RPC rpcMove, other client in the group 12 doesn't receive the rpc... but in fact all work like I never add group or set SetReceivingEnabled ...
Any helps ?
Thanks for any answers!