void Awake() { if (!isInit) { #if UNITY_ANDROID moblinkUtils = new AndroidMobLinkImpl(); #elif UNITY_IPHONE moblinkUtils = new iOSMobLinkImpl(); #endif isInit = true; } _instance = this; }
void Awake() { if (!isInit) { #if UNITY_ANDROID moblinkUtils = new AndroidMobLinkImpl(); #elif UNITY_IPHONE moblinkUtils = new iOSMobLinkImpl(); #endif isInit = true; } if (_instance != null) { DestroyObject(_instance.gameObject); } _instance = this; DontDestroyOnLoad(this.gameObject); }