Get Screen

Description

The Get Screen behavior will retrieve the screen properties including the position, size, zoom and aspect ratio. You can then output this to use with other behaviors, or create logic to make your project behave differently for different screen sizes.

 This behavior will Trigger an event immediately when executed. As soon as the behavior is executed it will output the specified property.

Properties

This behavior has no properties to modify

Outputs

 

X

The current horizontal position of the center of the screen in world coordinates.

 Y

The current vertical position of the center of the screen in world coordinates.

Width

The current width of the physical device screen measured in meters. This is independent of the zoom level. Eg. iPad is 32m.

Height

The current height of the physical device screen measured in meters. This is independent of the zoom. Eg. the iPad height is 16m

Aspect Ratio

 The current device aspect ratio. Eg. iPad is 4:3. Learn more about the different aspect ratios and multiple screen sizes.

Zoom

This is the current zoom level as a percentage. 100% is the default zoom level.

 

Examples

If you are creating a Universal Project  and want to know when the project is running on an iPhone or an iPad, you can use the Get Screen behavior to get the aspect ratio of the device. If it's 4:3 you know they are on an iPad, if it's 16:9 you know it's an iPhone 5 or newer.

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk