Search Unity

Reward player for watching a video

Discussion in 'Unity Ads & User Acquisition' started by elmar1028, Aug 25, 2015.

  1. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Hi guys,

    How do I reward a player for watching a UnityAds video?

    Thanks in advance :)
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    You decide. Giving them an extra life, in-game virtual money, new characters etc.

    Although not sure I understood your question correct...

    /Rasmus
     
  3. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    From time to time, I want to show player an option to watch a video to get coins. Now the question stands, is there an API for that: like check if video was watched, or force video to be full etc.
     
  4. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
  5. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Hi,

    Could you please give me an example on how can I run a function when the video is finished?

    Many thanks!
     
  6. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    elmar1028 likes this.
  7. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Thanks a lot @rasmus-unity

    How do I force player to watch the whole video?
     
  8. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    You specify the rewarded zone id (default "rewardedVideoZone" these days) in your call to IsReady() and Show() methods, e.g.

    Code (CSharp):
    1. if (!Advertisement.IsReady("rewardedVideoZone"))
    2. {
    3.     Debug.Log("Ads not ready");
    4.     return;
    5. }
    6.  
    7. Advertisement.Show("rewardedVideoZone", ...);
     
  9. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Alright! It works! Thanks a lot rasmus! :D