private static void _ManuallyRestorePurchases(Action onRestoreSuccessCallback, Action onRestoreFailedCallback) { if (GameObject.Find(FGLEnhance_Callbacks.CallbackObjectName) == null) { string newName = "__FGLEnhance_Callback_" + UnityEngine.Random.Range(0, int.MaxValue); GameObject callbackObject = new GameObject(newName); callbackObject.AddComponent <FGLEnhance_Callbacks>(); } FGLEnhance_Callbacks.OnRestorePurchasesSuccessCallback = onRestoreSuccessCallback; FGLEnhance_Callbacks.OnRestorePurchasesFailedCallback = onRestoreFailedCallback; Enhance.InitializeEnhance(); #if UNITY_ANDROID FGLAndroidInternals.ManuallyRestorePurchases(FGLEnhance_Callbacks.CallbackObjectName); #elif UNITY_IOS FGLiOSInternals.ManuallyRestorePurchases(FGLEnhance_Callbacks.CallbackObjectName); #endif }