void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } }
/// <summary> /// Initialize the default instance of AppLovin SDK. /// /// Please make sure that application's Android manifest or Info.plist includes the AppLovin SDK key. /// /// <param name="adUnitIds"> /// OPTIONAL: Set the MAX ad unit ids to be used for this instance of the SDK. 3rd-party SDKs will be initialized with the credentials configured for these ad unit ids. /// This should only be used if you have different sets of ad unit ids / credentials for the same package name.</param> /// </summary> public static void InitializeSdk(String[] adUnitIds = null) { _ensureHaveSdkKey(); _isInitialized = true; _hasSdkKey = true; // Slight delay to emulate the SDK initializing ExecuteWithDelay(0.1f, () => { _isInitialized = true; MaxSdkCallbacks.EmitSdkInitializedEvent(); }); }