How can i get the right screen resolution on Android at application launch?

I have created a scene that has a unique gameObject, that has a script attached.
The script simply get the Screen.width and Screen.height on Awake.

The problem is that when I launch the app on Android, I get the wrong resolution at first frames, while it outputs the right resolution later.

How can I solve that?

Thank you.

I think you need to get the screen info on Start, not Awake. Try that instead.

I had this same issue with a PC standalone game. Even on using Start it returned the wrong value. I had to use a co-routine to wait a little bit before the screen returned the right resolution.