Class DemoUtils | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class DemoUtils

    Inheritance
    System.Object
    DemoUtils
    Namespace: Unity.Tiny.Utils
    Syntax
    public class DemoUtils

    Fields

    entityManager

    Declaration
    public static EntityManager entityManager
    Field Value
    Type Description
    EntityManager

    tinyEnv

    Declaration
    public static TinyEnvironment tinyEnv
    Field Value
    Type Description
    TinyEnvironment

    world

    Declaration
    public static World world
    Field Value
    Type Description
    World

    Methods

    AddRectTransform(Entity)

    Declaration
    public static void AddRectTransform(Entity e)
    Parameters
    Type Name Description
    Entity e

    CreateCamera(Int32, Color, Single, Single, Single, Single, Single)

    Declaration
    public static Entity CreateCamera(int h, Color backgroundColor, float depth = 0F, float rectX = 0F, float rectY = 0F, float rectW = 1F, float rectH = 1F)
    Parameters
    Type Name Description
    System.Int32 h
    Color backgroundColor
    System.Single depth
    System.Single rectX
    System.Single rectY
    System.Single rectW
    System.Single rectH
    Returns
    Type Description
    Entity

    CreateImage2D(String, Boolean, Boolean, Boolean)

    Declaration
    public static Entity CreateImage2D(string file, bool disableSmoothing = true, bool hasAlpha = true, bool bitmask = false)
    Parameters
    Type Name Description
    System.String file
    System.Boolean disableSmoothing
    System.Boolean hasAlpha
    System.Boolean bitmask
    Returns
    Type Description
    Entity

    CreateRect(Single, Single, Single, Single)

    Declaration
    public static Rect CreateRect(float x, float y, float width, float height)
    Parameters
    Type Name Description
    System.Single x
    System.Single y
    System.Single width
    System.Single height
    Returns
    Type Description
    Rect

    CreateRenderer(Entity)

    Declaration
    public static Entity CreateRenderer(Entity sprite)
    Parameters
    Type Name Description
    Entity sprite
    Returns
    Type Description
    Entity

    CreateSprite(Entity, Int32, Int32, Int32, Int32, Int32, Int32, Single)

    Declaration
    public static Entity CreateSprite(Entity image, int x0 = -1, int y0 = -1, int x1 = -1, int y1 = -1, int w = -1, int h = -1, float pixelToWorldUnits = 1F)
    Parameters
    Type Name Description
    Entity image
    System.Int32 x0
    System.Int32 y0
    System.Int32 x1
    System.Int32 y1
    System.Int32 w
    System.Int32 h
    System.Single pixelToWorldUnits
    Returns
    Type Description
    Entity

    CreateSpriteRect(Entity, Color, Int32, Int32, Int32, Int32, Int32, Int32, Single)

    Declaration
    public static Entity CreateSpriteRect(Entity image, Color color, int x0 = -1, int y0 = -1, int x1 = -1, int y1 = -1, int w = -1, int h = -1, float pixelsToWorldUnits = 1F)
    Parameters
    Type Name Description
    Entity image
    Color color
    System.Int32 x0
    System.Int32 y0
    System.Int32 x1
    System.Int32 y1
    System.Int32 w
    System.Int32 h
    System.Single pixelsToWorldUnits
    Returns
    Type Description
    Entity

    CreateSquare(Entity, Color, Single, Single, Single, Single, Single, Single)

    Declaration
    public static Entity CreateSquare(Entity image, Color color, float cx = 0F, float cy = 0F, float cz = 0F, float w = 1F, float h = 1F, float pixelsToWorldUnits = 1F)
    Parameters
    Type Name Description
    Entity image
    Color color
    System.Single cx
    System.Single cy
    System.Single cz
    System.Single w
    System.Single h
    System.Single pixelsToWorldUnits
    Returns
    Type Description
    Entity

    CreateUICanvas()

    Declaration
    public static Entity CreateUICanvas()
    Returns
    Type Description
    Entity

    Initialize(Int32, Int32, RenderMode, Boolean)

    Declaration
    public static void Initialize(int width, int height, RenderMode renderMode = RenderMode.Auto, bool DisableSwitchRenderingSystem = false)
    Parameters
    Type Name Description
    System.Int32 width
    System.Int32 height
    RenderMode renderMode
    System.Boolean DisableSwitchRenderingSystem

    MainLoop()

    Declaration
    public static bool MainLoop()
    Returns
    Type Description
    System.Boolean

    PixelRect(Int32, Int32, Int32, Int32, Int32, Int32)

    Declaration
    public static Rect PixelRect(int x0, int y0, int x1, int y1, int w, int h)
    Parameters
    Type Name Description
    System.Int32 x0
    System.Int32 y0
    System.Int32 x1
    System.Int32 y1
    System.Int32 w
    System.Int32 h
    Returns
    Type Description
    Rect

    RunWindow()

    Declaration
    public static void RunWindow()

    SetDisplaySize(Int32, Int32, RenderMode)

    Declaration
    public static void SetDisplaySize(int width, int height, RenderMode renderMode = RenderMode.Auto)
    Parameters
    Type Name Description
    System.Int32 width
    System.Int32 height
    RenderMode renderMode
    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