How to change GUI fit to fullscreen resolution?

for making fullscreen,

I think there are 2 ways.

  1. Changing GUI’s size to fit fullscreen resolution.

  2. Changing computer’s background screen’s resolution to game’s resolution.

How to do it?

About 2. is there API to do it?

if you want to force a resolution you choose the resolutions in the player settings.

If you are trying to make your GUI work on multiple resolutions try using Screen.width and Screen.height for sizes so it is more flexible.

So then, all GUI’s Rect should use Screen.width basis?

You can do that, but remember different aspect ratios will give different results. If you are clever and your interfaces are floating you can make them work on most resolutions.

There are libraries available with handle this problem to a degree but I choose to do it myself using the Screen.width and making my buttons have defined shapes (like always square, 2 x1 etc)