Search Unity

Detecting When Ad has been Skipped or Finished Running

Discussion in 'Unity Ads' started by Tim-Duval, Mar 14, 2019 at 10:01 PM.

  1. Tim-Duval

    Tim-Duval

    Joined:
    Sep 2, 2015
    Posts:
    366
    I can't seem to find anything on how to detect when the video ad has finished running or if the user clicks skip button on the player. What I want to achieve is this:
    1) Certain scenes in game will have an ad rather than a loading splash screen.
    2) When the ad is either skipped or completed the next scene will load.

    I know how to change scenes. I don't know how to gather data about the ads. I'll make up an example:

    Code (CSharp):
    1. Monitization.Finished()
    2. Monitization.Skipped()
    3. // Above is an example of the calls I need to know.
    4.  
    5. if(Monitization.Finished() == true)
    6. {
    7.     SceneManager.LoadLevel(2);
    8. }
    9. if(Monitization.Skipped() == true)
    10. {
    11.     SceneManager.LoadLevel(2);
    12. }
    My problem is this is the first time I've ever played with ads so I don't know any of the builtin functions or where to learn about it. All help is appreciated!
     
  2. mikaisomaa

    mikaisomaa

    Unity Technologies

    Joined:
    Sep 14, 2015
    Posts:
    332
    Tim-Duval likes this.
  3. Tim-Duval

    Tim-Duval

    Joined:
    Sep 2, 2015
    Posts:
    366