コード例 #1
0
        /// <summary>
        /// Start the SignalR connection asynchronously and subscribe to PlayStream events if successfully connected.
        /// Optionally pass an filter id to only be subscribed to specific types of PlayStream events. Event filters can be configured on GameManager.
        /// </summary>
        public static void Start(string eventFilterId = null)
        {
            Action connetionCallback = () =>
            {
                OnConnectedCallback(eventFilterId);
            };

            PlayFabHttp.InitializeSignalR(PlayFabSettings.ProductionEnvironmentPlayStreamUrl, "EventStreamsHub", connetionCallback, OnReceivedCallback, OnReconnectedCallback, OnDisconnectedCallback, OnErrorCallback);
        }
コード例 #2
0
 /// <summary>
 /// Start the SignalR connection asynchronously and subscribe to PlayStream events if successfully connected. This is called automatically by subscribing to OnPlayStreamEvents.
 /// </summary>
 public static void Start(string filter = null)
 {
     PlayFabHttp.InitializeSignalR("http://playstreamlive.playfab.com/signalr", "EventStreamsHub", OnConnectedCallback, OnReceivedCallback, OnReconnectedCallback, OnDisconnectedCallback, OnErrorCallback);
 }