Пример #1
0
 public static void Unregister()
 {
     PlayFabSettings.UnregisterForRequests(null, _onRequestGl);
     PlayFabSettings.UnregisterForResponses(null, _onResponseGl);
     PlayFabSettings.UnregisterForRequests("/Client/LoginWithCustomID", _onRequestLogin);
     PlayFabSettings.UnregisterForResponses("/Client/LoginWithCustomID", _onResponseLogin);
 }
Пример #2
0
        public void OnDestroy()
        {
            PlayFabSettings.UnregisterInstance(this); // Automatically unregisters all callbacks bound to this instance - No delegate casting or local variables needed for a full un-register

            // Un-registering for static methods, using the static delegate variables defined by each function - No simple way to identify/clear these together the instance
            PlayFabSettings.UnregisterForRequests(null, _onApiRequestStGl);
            PlayFabSettings.UnregisterForResponses(null, _onApiResponseStGl);
            PlayFabSettings.UnregisterForRequests("/Client/LoginWithEmailAddress", _onApiRequestStLogin);
            PlayFabSettings.UnregisterForResponses("/Client/LoginWithEmailAddress", _onApiResponseStLogin);
            PlayFabSettings.UnregisterForRequests("/Client/LoginWithAndroidDeviceID", _onApiRequestStLogin2);
            PlayFabSettings.UnregisterForResponses("/Client/LoginWithAndroidDeviceID", _onApiResponseStLogin2);
            PlayFabSettings.UnregisterForRequests("/Client/LoginWithIOSDeviceID", _onApiRequestStLogin2);
            PlayFabSettings.UnregisterForResponses("/Client/LoginWithIOSDeviceID", _onApiResponseStLogin2);
        }