How to Kick Room Members¶
Members are kicked by other room members in the same room. To kick a member two conditions must be met, or an error will be returned:
The kicking player should be the room owner.
The kicking player cannot kick themselves.
An error code of RoomErrorCode.NotRoomOwner or MatchErrorCode.SelfKickProhibited respectively will be called if not so.
The following code kicks the specific room member by its UID.
UID uid = new ChildUID(new ServerUID(1), 2);
StrixNetwork.instance.KickRoomMember(uid,
args => {
Debug.Log("KickRoomMember succeeded");
},
args => {
Debug.Log("KickRoomMember failed. error = " + args.cause);
}
);