void Awake() { DontDestroyOnLoad(this.gameObject); if (RuntimePlatform.Android == Application.platform || RuntimePlatform.IPhonePlayer == Application.platform) { GGAdConfig adConfig = new GGAdConfig(); adConfig.setListener(new GreedyAgentListener()); adConfig.setGameId(GameId); adConfig.enableAdmobMediation(AdMobMediation); adConfig.enableMopubMediation(MoPubMediation); adConfig.addUnitList(unitList); GreedyGameAgent.Instance.init(adConfig); } else { moveToNextScene(); } }
private void OnGUI() { if (GUI.Button(new Rect(10, 10, 200, 100), "Init")) { if (RuntimePlatform.Android == Application.platform || RuntimePlatform.IPhonePlayer == Application.platform) { GGAdConfig adConfig = new GGAdConfig(); adConfig.setListener(new GreedyAgentListener()); adConfig.setGameId(gameId); adConfig.enableAdmobMediation(AdmobMediation); adConfig.enableFacebookMediation(FacebookMediation); adConfig.enableMopubMediation(MopubMediation); adConfig.disableReflection(false); adConfig.addUnitList(unitList); GreedyGameAgent.Instance.init(adConfig); //Task.Delay(1000).ContinueWith(t => GreedyGameAgent.Instance.startEventRefresh()); } } }
void Awake() { DontDestroyOnLoad(this.gameObject); if (RuntimePlatform.Android == Application.platform || RuntimePlatform.IPhonePlayer == Application.platform) { GGAdConfig adConfig = new GGAdConfig(); adConfig.setListener(new GreedyAgentListener()); adConfig.setGameId(gameId); adConfig.enableAdmobMediation(AdmobMediation); adConfig.enableFacebookMediation(FacebookMediation); adConfig.enableMopubMediation(MopubMediation); adConfig.disableReflection(false); adConfig.addUnitList(unitList); GreedyGameAgent.Instance.init(adConfig); //Task.Delay(1000).ContinueWith(t => GreedyGameAgent.Instance.startEventRefresh()); } else { moveToNextScene(); } }