public void Awake()
        {
            // Instance methods must be cast to a delegate inside the registration function
            PlayFabSettings.RequestCallback <object> onApiRequestInstGl = OnApiRequest_InstGl;                            // Generic callbacks have to use the generic signature
            PlayFabSettings.ResponseCallback <object, PlayFabResultCommon> onApiResponseInstGl    = OnApiResponse_InstGl; // Generic callbacks have to use the generic signature
            PlayFabClientAPI.LoginWithEmailAddressRequestCallback          onApiRequestInstLogin  = OnApiRequest_InstLogin;
            PlayFabClientAPI.LoginWithEmailAddressResponseCallback         onApiResponseInstLogin = OnApiResponse_InstLogin;
            PlayFabSettings.RequestCallback <object> onApiRequestInstLogin2 = OnApiRequest_InstLogin2;                         // Generic callbacks have to use the generic signature
            PlayFabSettings.ResponseCallback <object, PlayFabResultCommon> onApiResponseInstLogin2 = OnApiResponse_InstLogin2; // Generic callbacks have to use the generic signature

            // Registering for instance methods, using the local delegate variables (bound to the "this" instance)
            PlayFabSettings.RegisterForRequests(null, onApiRequestInstGl);
            PlayFabSettings.RegisterForResponses(null, onApiResponseInstGl);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithEmailAddress", onApiRequestInstLogin);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithEmailAddress", onApiResponseInstLogin);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithAndroidDeviceID", onApiRequestInstLogin2);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithAndroidDeviceID", onApiResponseInstLogin2);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithIOSDeviceID", onApiRequestInstLogin2);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithIOSDeviceID", onApiResponseInstLogin2);

            // Registering for static methods, using the static delegate variables defined by each function
            PlayFabSettings.RegisterForRequests(null, _onApiRequestStGl);
            PlayFabSettings.RegisterForResponses(null, _onApiResponseStGl);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithEmailAddress", _onApiRequestStLogin);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithEmailAddress", _onApiResponseStLogin);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithAndroidDeviceID", _onApiRequestStLogin2);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithAndroidDeviceID", _onApiResponseStLogin2);
            PlayFabSettings.RegisterForRequests("/Client/LoginWithIOSDeviceID", _onApiRequestStLogin2);
            PlayFabSettings.RegisterForResponses("/Client/LoginWithIOSDeviceID", _onApiResponseStLogin2);
        }
Beispiel #2
0
            public void Register()
            {
                // Instance methods must be cast to a delegate inside the registration function
                PlayFabSettings.RequestCallback <object> onRequestInstGl = OnRequest_InstGl;                         // Generic callbacks have to use the generic signature
                PlayFabSettings.ResponseCallback <object, PlayFabResultCommon> onResponseInstGl = OnResponse_InstGl; // Generic callbacks have to use the generic signature
                PlayFabClientAPI.LoginWithCustomIDRequestCallback  onRequestInstLogin           = OnRequest_InstLogin;
                PlayFabClientAPI.LoginWithCustomIDResponseCallback onResponseInstLogin          = OnResponse_InstLogin;

                // Registering for instance methods, using the local delegate variables (bound to the "this" instance)
                PlayFabSettings.RegisterForRequests(null, onRequestInstGl);
                PlayFabSettings.RegisterForResponses(null, onResponseInstGl);
                PlayFabSettings.RegisterForRequests("/Client/LoginWithCustomID", onRequestInstLogin);
                PlayFabSettings.RegisterForResponses("/Client/LoginWithCustomID", onResponseInstLogin);
            }