Struct DisplayInfo | Project Tiny | 0.32.0-preview.54
docs.unity3d.com
    Show / Hide Table of Contents

    Struct DisplayInfo

    Configures display-related parameters. You can access this component via GetSingleton<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

    backgroundBorderColor

    Color to clear the background when rendering at fixed aspect This color is the "black bars" where there is no rendering and the rendering aspect is not the same as the display aspect. Cameras still clear with their own color

    Declaration
    public Color backgroundBorderColor
    Field Value
    Type Description
    Color

    colorSpace

    Color space to use for rendering. The default and recommended color space is Linear, where shader math and belnding is correct. In linear space srgb encodings are properly handled, and the backbuffer is srgb. Gamma space disables all srgb de and encoding. Using gamma space is required to run on older devices and some web browsers that do not support srgb textures.

    Declaration
    public ColorSpace colorSpace
    Field Value
    Type Description
    ColorSpace

    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

    gpuSkinning

    Specifies whether using gpu mesh skinning.

    Declaration
    public bool gpuSkinning
    Field Value
    Type Description
    Boolean

    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
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023