A
A
ALTech12019-12-05 11:03:02
Unity
ALTech1, 2019-12-05 11:03:02

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

1 answer(s)
D
Deathgar, 2019-12-05
@Deathgar

Try to read about the adaptive interface
This link will show you a little the essence of the adaptive, but in general they googled this matter. Responsive interface unity. This will help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question