Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved] What are Unity Banner dimensions?

Discussion in 'Unity Ads & User Acquisition' started by Sarazan, Nov 5, 2018.

Thread Status:
Not open for further replies.
  1. Sarazan

    Sarazan

    Joined:
    Apr 29, 2013
    Posts:
    12
    Do all unity banners have the same dimensions, or is it device-dependent? Is there an API Call? Is it documented somewhere?

    Basically I just need to be able to offset the rest of my UI to adjust for it.

    Thanks!
    -Aaron
     
    burakisgoingg likes this.
  2. tailorjay

    tailorjay

    Unity Technologies

    Joined:
    Sep 8, 2016
    Posts:
    13
    Hi Aaron .... at the moment all the banner ads are of 320x50 size and will be stitched to the bottom of view. Hope this helps
     
    Archviz3d likes this.
  3. Sarazan

    Sarazan

    Joined:
    Apr 29, 2013
    Posts:
    12
    Sounds good, thanks!
     
  4. Sarazan

    Sarazan

    Joined:
    Apr 29, 2013
    Posts:
    12
    @tailorjay so I'm trying to figure out how to offset for this, and I ended up multiplying 50f * {canvasScaler.referenceResolution.x / Screen.width} -- unfortunately it only ended up being about half the height of the banner itself-- is it possible the actual height is 100?
     
  5. Adnimistrator

    Adnimistrator

    Joined:
    Mar 12, 2015
    Posts:
    4
    @Sarazan
    Code (CSharp):
    1.  
    2. public float GetBannerHeight()
    3. {
    4. return Mathf.RoundToInt(50 * Screen.dpi / 160);
    5. }
    6.  
     
Thread Status:
Not open for further replies.