public void OnDestroy() { if (_InAppObj != null) { _InAppObj.OnDestroy(); _InAppObj = null; } _instance = null; IsInitialized = false; }
public void InitManager() { Debug.Log("+[IABManager] InitManager"); DontDestroyOnLoad(this); if (!IsInitialized) { #if UNITY_EDITOR _InAppObj = new InAppUnityEditor(); #elif UNITY_IOS _InAppObj = new InAppAppleAppStore(); #elif UNITY_ANDROID _InAppObj = new InAppGooglePlay(); #endif _InAppObj.Init(); IsInitialized = true; } Debug.Log("-[IABManager] InitManager"); }