new void Awake() { Debug.Log("*** GUEST ***"); Assert.IsNotNull(context); state = GuestState.LoggingIn; InitializePlatformSDK(GetEntitlementCallback); Matchmaking.SetMatchFoundNotificationCallback(MatchFoundCallback); Rooms.SetUpdateNotificationCallback(RoomUpdatedCallback); Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback); Net.SetPeerConnectRequestCallback(PeerConnectRequestCallback); Net.SetConnectionStateChangedCallback(ConnectionStateChangedCallback); Voip.SetVoipConnectRequestCallback((Message <NetworkingPeer> msg) => { Debug.Log("Accepting voice connection from " + msg.Data.ID); Voip.Accept(msg.Data.ID); }); Voip.SetVoipStateChangeCallback((Message <NetworkingPeer> msg) => { Debug.LogFormat("Voice state changed to {1} for user {0}", msg.Data.ID, msg.Data.State); }); }
void Start() { Matchmaking.SetMatchFoundNotificationCallback(MatchFoundCallback); Rooms.SetUpdateNotificationCallback(MatchmakingRoomUpdateCallback); TransitionToState(MatchRoomState.None); }
public MatchmakingManager() { m_remotePlayers = new Dictionary <ulong, User>(); Matchmaking.SetMatchFoundNotificationCallback(MatchFoundCallback); Rooms.SetUpdateNotificationCallback(MatchmakingRoomUpdateCallback); }
// Use this for initialization void Start() { currentState = states.NOT_INIT; localUser = null; remoteUser = null; currentRoom = null; lastPacketID = 0; ratedMatchStarted = false; Core.Initialize(); // Setup our room update handler Rooms.SetUpdateNotificationCallback(updateRoom); // Setup our match found handler Matchmaking.SetMatchFoundNotificationCallback(foundMatch); checkEntitlement(); }