// Start is called before the first frame update void Start() { TestIntertitial1.Initialize(); TestIntertitial2.Initialize(); TestRewarded1.Initialize(); TestRewarded2.Initialize(); TestBanner.Load(); }
private void OnDestroy() { TestIntertitial1.RemoveListener(); TestIntertitial2.RemoveListener(); TestRewarded1.RemoveListener(); TestRewarded2.RemoveListener(); TestBanner.Hide(); }
public void ShowTestRewarded2() { if (TestRewarded2.IsReady) { TestRewarded2.Show(); } else { Debug.Log("Test TestRewarded2 is no ready"); } }
public async void ShowRewarded2Await() { // Show the add UnityEngine.Advertisements.ShowResult result; try { Debug.Log("Awiting for: " + TestRewarded2.name); result = await TestRewarded2.Show(); } catch (System.Exception) { result = UnityEngine.Advertisements.ShowResult.Failed; } // Choose action based in result Debug.Log("Result: " + result); }