/// <summary> /// The OnResult method fires when it recieves the answer from the server /// </summary> /// <param name="resultCode">Code</param> /// <param name="response">Response</param> public void OnResult(int resultCode, ProductDetailsResponse response) { hmsManager = GameObject.Find("HMSManager").GetComponent <HMSManager>(); callbacksHandler = GameObject.Find("HMSManager").GetComponent <HMSCallbacksHandler>(); if (resultCode == 0) { hmsManager.numberOfProductsRetrieved++; callbacksHandler.onProductDetailSuccess(response); if (hmsManager.numberOfProductsRetrieved == hmsManager.products.Length) { #if DEBUG Debug.Log("[HMS]: all products retrieved"); #endif callbacksHandler.productListInitialiced(); } } else { callbacksHandler.onProductDetailError(resultCode); } }