Answer the question
In order to leave comments, you need to log in
How to resize a banner in Unity?
Hello!
I created an advertising banner in Unity with such a script. Everything is fine, only on some screen resolutions the banner is very small. How to change its size, or how to change it depending on the resolution?
public string gameId = "3387103";
public string placementId = "RiseUp";
public bool testMode = true;
void Start()
{
Advertisement.Initialize(gameId, testMode);
StartCoroutine(ShowBannerWhenReady());
}
IEnumerator ShowBannerWhenReady()
{
while (!Advertisement.IsReady(placementId))
{
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.Show(placementId);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question