// 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 ShowTestRewarded1() { if (TestRewarded1.IsReady) { TestRewarded1.Show(); } else { Debug.Log("Test TestRewarded1 is no ready"); } }
public async void ShowRewarded1Await() { // Show the add UnityEngine.Advertisements.ShowResult result; try { Debug.Log("Awiting for: " + TestRewarded1.name); result = await TestRewarded1.Show(); } catch (System.Exception) { result = UnityEngine.Advertisements.ShowResult.Failed; } Debug.Log("Result: " + result); }