Struct DisplayInfo
Configures display-related parameters. You can access this component via TinyEnvironment.Get/SetConfigData<DisplayInfo>()
Namespace: Unity.Tiny.Core2D
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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.Int32 |
height
Specifies the output height, in logical pixels. Writing will resize the window, where supported.
Declaration
public int height
Field Value
Type | Description |
---|---|
System.Int32 |
orientation
Specifies the device display (screen) orientation. Can be Horizontal or Vertical.
Declaration
public DisplayOrientation orientation
Field Value
Type | Description |
---|---|
DisplayOrientation |
renderMode
Forces DisplayInfo to use a specific renderer.
Declaration
public RenderMode renderMode
Field Value
Type | Description |
---|---|
RenderMode |
Remarks
This allows switching between WebGL and Canvas rendering in the HTML runtime. The RenderMode enum defines possible renderers. The default is Auto. Switching renderers at runtime is usually possible, but may not be seamless.
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 |
---|---|
System.Single |
screenHeight
Specifies the device display (screen) height, in pixels.
Declaration
public int screenHeight
Field Value
Type | Description |
---|---|
System.Int32 |
screenWidth
Specifies the device display (screen) width, in pixels.
Declaration
public int screenWidth
Field Value
Type | Description |
---|---|
System.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 |
---|---|
System.Boolean |
width
Specifies the output width, in logical pixels. Writing will resize the window, where supported.
Declaration
public int width
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Default
Declaration
public static DisplayInfo Default { get; }
Property Value
Type | Description |
---|---|
DisplayInfo |