Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

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

$
0
0
Please understand that I do not speak English so I use a translator. I am developing a mobile game. Currently, we have progressed to some extent, and we are trying to put an advertisement using admob. Among them, I want to modify the banner ad to the desired location. When I edited the prefab or modified the code, the banner ad seemed to have moved in the editor, but when I built it on mobile, the banner ad did not move. Is it possible that the banner ad can not be moved to any position (where I want it to be) except for the top, bottom, and center? I will attach a picture of the way I did it. And the function I touched to modify the position is in the SetAndStretchAd function of the BannerClient script if (pos == AdPosition.Bottom || pos == AdPosition.BottomLeft || pos == AdPosition.BottomRight) { rect.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Bottom, 0, rect.sizeDelta.y); rect.anchoredPosition = new Vector2(0, (float)rect.sizeDelta.y/2 + 400); } I tried to modify it this way, or I changed the value of the Prefab by changing it to Center. ![alt text][1] ![alt text][2] [1]: /storage/temp/176920-load-banner.png [2]: /storage/temp/176921-edit-code.png

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>