Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 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 stevendale · Oct 29, 2016 at 01:51 PM · admobpositioningbanner

Change position of AdMob banner when opening new scene

Hi, Like subject says, is there a way to change position of AdMob banner when opening new scene? For example, its an Android game and position of banner in Menu scene is at left-bottom, but when I load Game scene (other scene) I want banner to be at bottom position. Is that possible? I tried bunch of things but no luck. Thanks in advance!

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by romatallinn · Oct 29, 2016 at 02:00 PM

Try find out something about AdPosition. Maybe you could change it as you like according to scene changes.

For example, when scene is changed, you destroy old ad instance and create a new one with desired position.

 BannerView bannerView = new BannerView(adUnitId, adSize, AdPosition.Bottom);


Comment
Add comment · 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
1

Answer by gzervop · Nov 24, 2021 at 11:45 AM

Best practise is to not destroy an ad but let admob do its things, so if you want to change position dependig on the case use the following.

 this.bannerView.SetPosition( AdPosition.Top);
Comment
Add comment · 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
0

Answer by stevendale · Oct 29, 2016 at 02:21 PM

Thanks for answer! Ok, so I have to destroy old one and create new one? Would that change, for example, load totally new ad (wont show ad that was at Menu scene)?

Comment
Add comment · Show 3 · 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 romatallinn · Oct 29, 2016 at 02:35 PM 0
Share

@stevendale does it matter for you? The new ad instance may show the same ad as it was at the previous scene, but also it may show another one.

I am not sure whether you have to destroy old one or not. $$anonymous$$aybe you could just change the position by accessing to BanerView's variable. Try to find any variable inside bannerView.something that is similar to AdPosition or just position. I just don't know.

I tried to google your problem and found out something similar here. So, I've concluded that you need to recreate ad instance.

avatar image stevendale romatallinn · Oct 30, 2016 at 06:55 PM 0
Share

@romatallinn sorry for late apply. Once again, thank you very much for your time and effort! Doesnt matter for me at all but does it effects Ad$$anonymous$$ob in any way, like revenue or something? I tried bunch of things with bools and statements on AdPositon but banner always stays at position that is loaded on first scene. I guess that only solution is by destroying and recreating ad instance.

avatar image romatallinn stevendale · Nov 10, 2016 at 10:28 PM 0
Share

@stevendale could you please accept my answer if it helped you :)

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

78 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

Related Questions

AdMob Banner not showing 1 Answer

AdMob banner ad not showing! 1 Answer

I would like to move the banner ad location of Unity AdMob to the location I want. 0 Answers

Admob Banner Has Shown Only Twice in Two Weeks 0 Answers

How to move the UI down when an ad banner appears 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