Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by thornekey · Jun 08, 2017 at 08:47 AM · androidmobileadmoborientationadvertising

Unity Admob glitching game screen

Im using Admob in my unity game for android. I want to have reward videos. My game's orientation is set to portrait only and when the admob reward video shows it glitches the screen out and makes it go horizonal and chopped in half.

How do i solve this. This is not a question about how to set the orientation of the ad.. i know i cant.. This is a question about the screen getting chopped in half and glitching out.

alt text

screenshot.png (491.5 kB)
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

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by kornstar83 · Jun 08, 2017 at 10:20 AM

I'm currently using Unity Ads to run my rewarded video ads, I also have a game that is played in portrait orientation, the landscape interstitial ads seem to work just fine.

Comment
Add comment · Show 4 · 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 thornekey · Jun 08, 2017 at 10:36 AM 0
Share

could you show me your code for calling the ad and/or project settings?

avatar image kornstar83 · Jun 08, 2017 at 10:47 AM 0
Share

Here is the code:

 using UnityEngine;
 using UnityEngine.Advertisements;
 
 public class VideoAdHandler : $$anonymous$$onoBehaviour
 {
     public void ShowRewardedAd()
     {
         if (Advertisement.IsReady("rewardedVideo"))
         {
             var options = new ShowOptions { resultCallback = HandleShowResult };
             Advertisement.Show("rewardedVideo", options);
         }
     }
     private void HandleShowResult(ShowResult result)
     {
         switch (result)
         {
         case ShowResult.Finished:
             Debug.Log("The ad was successfully shown.");
             //Add payment code here
             break;
         case ShowResult.Skipped:
             Debug.Log("The ad was skipped before reaching the end.");
             break;
         case ShowResult.Failed:
             Debug.LogError("The ad failed to be shown.");
             break;
         }
     }
 }

As for project settings you just need to click Window > Services or press ctrl + 0, to open the services tab and simply turn on unity Ads, have a button call the ShowRewardedAd() function and it should all work.

avatar image thornekey kornstar83 · Jun 08, 2017 at 10:50 AM 0
Share

can i use this with Admob?

avatar image kornstar83 · Jun 08, 2017 at 10:56 AM 0
Share

not that I know of, Unity Ads and Ad$$anonymous$$ob are completely different.

I havent used Ad$$anonymous$$ob yet because it was a pain trying to get the Admob stuff working and it only took about 5 $$anonymous$$s including the time it took to type the script with Unity Ads.

If you are dead set on using Ad$$anonymous$$ob then someone else will have to help you, I have no experience with it, sorry

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

139 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

Related Questions

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat; - Unity Android Build Error 1 Answer

Unity[Android] AdMob error 0 Answers

Admob interstitial ad are slowing my game down 0 Answers

Why are unity test ads still playing, and not actual ads 1 Answer

Unity ads not showing at all after publishing 0 Answers


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