Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Rainbowin · Mar 24, 2021 at 04:10 PM · ads

unity rewarded video ad not working after loading a scene

Hello; i am facing a issue with my unity rewarded video ad. in the first scene the video rewarded ad is working fine . and when I enter scene 2 with a trigger. rewarded video ad won't load.

as if the listener is destroyed. how to show video rewarded ad after I enter scene 2.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Rainbowin · Mar 25, 2021 at 08:08 AM

of course no reply, I never get a reply here.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image akshaykumarpujar · Jun 04, 2021 at 06:37 PM 0
Share

Hey Buddy I'm facing the same problem did you solved that?

avatar image Rainbowin akshaykumarpujar · Jun 07, 2021 at 07:26 PM 0
Share

first i created two scripts (Rwarded video ads both have the same IDsurfacing) when video is completed I remove the listener

public void OnUnityAdsDidFinish (string surfacingId, ShowResult showResult) { // Define conditional logic for each ad completion status: if (showResult == ShowResult.Finished) { // Reward the user for watching the ad to completion.

         Player.transform.position = ExitPosition.transform.position;
         Player.transform.rotation = ExitPosition.transform.rotation;

         Advertisement.RemoveListener(this);
         Debug.Log("Listener From First Section is Removed");
         Debug.Log("Rewarded Video Ad is Finished Player In First Section is Teleported To Exit");
         
     } 

when you start a new scene you will addlistener in start method

start func. Advertisement.AddListener (this); Advertisement.Initialize (gameId, testMode);


what if scene is loaded and you lose, listener is already on how would you reload ads?

in both scripts for rewarded video ads, I used

void Awake() { Advertisement.Load(mySurfacingId); Debug.Log("Advertisment is Loaded in First Section"); }

you load the advertisement

so.. - remove listeners when video is completed - awake() Func. use Advertisement.Load(mySurfacingId); so if you lose video will reload

avatar image
0

Answer by Digital_Owl · May 01 at 09:34 AM

hey, some time passed and i still have exact same problem, im really hard stuck on this any suggestion what i can do?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rainbowin · May 04 at 06:49 AM 0
Share

Add Remove listener in your script, example:

 public void OnUnityAdsDidFinish (string surfacingId, ShowResult showResult) {
         // Define conditional logic for each ad completion status:
         if (showResult == ShowResult.Finished) {
             // Reward the user for watching the ad to completion.
 
             Player.transform.position = ExitPosition.transform.position;
             Player.transform.rotation = ExitPosition.transform.rotation;
             
             
             Advertisement.RemoveListener(this);
             Debug.Log("Listener From First Section is Removed");
             Debug.Log("Rewarded Video Ad is Finished Player In First Section is Teleported To Exit");
             
             
             
             
             
 
         } 

In this case when the scene is reloaded the script will add new listener, make sure to add awake func. example:

 void Start()
     {
         Advertisement.AddListener (this);
         Advertisement.Initialize (gameId, testMode);
         
 
         RewardedVideoButton.interactable = false;
         RewardedVideoMessage.SetActive(false);
         
         
         
         
     }
 
     void Awake() {
         Advertisement.Load(mySurfacingId);
         Debug.Log("Advertisment is Loaded in First Section");
     }

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

160 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity object custum events and sendmessage 0 Answers

can i apply an ad on a material 1 Answer

UnityAds.initialize() FPS drops on iOS 0 Answers

Infinite login redirect unity services 2 Answers

How to use unity rewarded ads? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges