public void SetReceivingEnabled(int group, bool enabled)
{
if (group <= 0)
{
Debug.LogError("Error: PhotonNetwork.SetReceivingEnabled was called with an illegal group number: " + group + ". The group number should be at least 1.");
return;
}
if (enabled)
{
if (!this.allowedReceivingGroups.Contains(group))
{
this.allowedReceivingGroups.Add(group);
byte[] groups = new byte[1] { (byte)group };
this.OpChangeGroups(null, groups);
}
}
else
{
if (this.allowedReceivingGroups.Contains(group))
{
this.allowedReceivingGroups.Remove(group);
byte[] groups = new byte[1] { (byte)group };
this.OpChangeGroups(groups, null);
}
}
}