Example #1
0
        private void Awake()
        {
            playerColorPicker.OnColorPicked += OnColorPicked;
            playerColorPicker.OnCancel      += ToggleInteractabilityOfColorButton;

            MultiplayerRegistrations.Register();

            NetworkingService.AddCallbackListener(MatchmakingCallbackEvent.JoinedRoom, OnJoinedRoom);
            NetworkingService.AddCallbackListener(InRoomCallbackEvent.ClientJoined, OnRoomUpdate);
            NetworkingService.AddCallbackListener(InRoomCallbackEvent.ClientLeft, OnRoomUpdate);
            NetworkingService.AddCallbackListener(InRoomCallbackEvent.HostChanged, OnRoomUpdate);
            NetworkingService.AddClientPropertyUpdateListener(OnClientPropertyUpdate);
        }