Device
Read-only information about the player's device. Use it to switch UI layouts, input schemes, or asset quality between mobile, tablet, desktop, and tv.
Device Type
Use this value for broad adaptation only, such as mobile controls, desktop hotkeys, or lower-quality assets on small devices.
bridge.device.typeBridge.device.typePlaygamaBridge.DeviceTypePlaygamaBridge::DeviceType()Bridge.device.typeplaygama_bridge_device_type()bridge.device.type()bridge.device.type
Possible values: mobile, tablet, desktop, tv.
Device OS
Returns the operating system of the player's device.
bridge.device.osPossible values: windows, macos, linux, android, ios, other.
Orientation
Returns the current screen orientation and lets you react when the player rotates the device.
If your game supports only one orientation, Bridge can show a built-in "rotate the device" overlay on mobile devices. Enable it in the config:
supportedOrientations lists the orientations your game supports (portrait, landscape); with useBuiltInOrientationPopup: true the overlay appears whenever the device is rotated to an unsupported one.
Screen Size
Listen for viewport size changes (debounced) to adapt the layout.
Safe Area
Returns the safe-area insets in pixels โ the area not covered by notches, rounded corners, or platform UI. Use it to keep HUD elements visible.
Among the engine plugins, safe area is currently wrapped in Unity only.
Bridge can also apply safe-area padding to the page automatically โ set game.adaptToSafeArea to true in the config.
Last updated