Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     TestIntertitial1.Initialize();
     TestIntertitial2.Initialize();
     TestRewarded1.Initialize();
     TestRewarded2.Initialize();
     TestBanner.Load();
 }
Пример #2
0
 private void OnDestroy()
 {
     TestIntertitial1.RemoveListener();
     TestIntertitial2.RemoveListener();
     TestRewarded1.RemoveListener();
     TestRewarded2.RemoveListener();
     TestBanner.Hide();
 }
Пример #3
0
 public void ShowTestRewarded1()
 {
     if (TestRewarded1.IsReady)
     {
         TestRewarded1.Show();
     }
     else
     {
         Debug.Log("Test TestRewarded1 is no ready");
     }
 }
Пример #4
0
    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);
    }