Scaling for icons in Studio

Hi all,

I have created an experience where I have 3 buttons at the top of the screen permanently (the buttons stay at the top regardless of how the user moves their device).

However, I have noticed that as the position of the buttons are fixed, part of the buttons disappear into beyond the top of the screen on smaller devices?

How am I able to get around this issue with scripting to allow the button position to be scaled relative to the screen size of the device used?

Many thanks in advance

If you want to fix something to the top of the screen, you can set the node’s RelativeTo property to Z.screenLeft. Studio has a UI coordinate system that typically has the coordinates [0,0] set as the middle of the screen. By changing the RelativeTo property from Z.screen to Z.screenLeft, the [0,0] coordinate moves to the top of the screen instead.

image

More info can be found on the UI coordinate system documentation. Hope that helps!

2 Likes

Hi,

Apologies for my last response, I misunderstood slightly, but I think what you’ve suggested is perfect! I will try that and report back, thanks.

1 Like