Struct DisplayInfo
Configures display-related parameters. You can access this component via TinyEnvironment.Get/SetConfigData<DisplayInfo>()
Namespace: Unity.Tiny
Syntax
public struct DisplayInfo : IComponentData
Fields
autoSizeToFrame
If set to true, the output automatically resizes to fill the frame (the browser or application window), and match the orientation. Changing output width or height manually has no effect.
Declaration
public bool autoSizeToFrame
Field Value
Type | Description |
---|---|
Boolean |
disableSRGB
Disable SRGB encodings. Filtering and blending will happen in non-linear (gamma) space, which is wrong but more performant on older devices. Also the srgb texture flag is ignored for texture reads. Enabling this flag is the equivalent of selecting Gamma workflow.
Declaration
public bool disableSRGB
Field Value
Type | Description |
---|---|
Boolean |
disableVSync
Specifies whether swapping should not wait for vertical sync. By default rendering will wait for sync is. Disabling the wait for sync might not be possible on some platforms, like inside a web browser.
Declaration
public bool disableVSync
Field Value
Type | Description |
---|---|
Boolean |
focused
Specifies whether the browser or application window has focus. Read only; setting this value has no effect.
Declaration
public bool focused
Field Value
Type | Description |
---|---|
Boolean |
framebufferHeight
Specifies the output height, in physical pixels. Read-only, but it can be useful for shaders or texture allocations.
Declaration
public int framebufferHeight
Field Value
Type | Description |
---|---|
Int32 |
framebufferWidth
Specifies the output width, in physical pixels. Read-only, but it can be useful for shaders or texture allocations.
Declaration
public int framebufferWidth
Field Value
Type | Description |
---|---|
Int32 |
frameHeight
Specifies the frame height, in pixels. This is the height of the browser or application window.
Declaration
public int frameHeight
Field Value
Type | Description |
---|---|
Int32 |
frameWidth
Specifies the frame width, in pixels. This is the width of the browser or application window.
Declaration
public int frameWidth
Field Value
Type | Description |
---|---|
Int32 |
height
Specifies the output height, in logical pixels. Writing will resize the window, where supported.
Declaration
public int height
Field Value
Type | Description |
---|---|
Int32 |
orientation
Specifies the device display (screen) orientation.
Declaration
public ScreenOrientation orientation
Field Value
Type | Description |
---|---|
ScreenOrientation |
screenDpiScale
Specifies the scale of the device display (screen) DPI relative to. 96 DPI. For example, a value of 2.0 yields 192 DPI (200% of 96).
Declaration
public float screenDpiScale
Field Value
Type | Description |
---|---|
Single |
screenHeight
Specifies the device display (screen) height, in pixels.
Declaration
public int screenHeight
Field Value
Type | Description |
---|---|
Int32 |
screenWidth
Specifies the device display (screen) width, in pixels.
Declaration
public int screenWidth
Field Value
Type | Description |
---|---|
Int32 |
visible
Specifies whether the browser or application window is currently visible on the screen/device display. Read only; setting this value has no effect.
Declaration
public bool visible
Field Value
Type | Description |
---|---|
Boolean |
width
Specifies the output width, in logical pixels. Writing will resize the window, where supported.
Declaration
public int width
Field Value
Type | Description |
---|---|
Int32 |
Properties
Default
Declaration
public static DisplayInfo Default { get; }
Property Value
Type | Description |
---|---|
DisplayInfo |