Struct Camera2DAxisSort | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct Camera2DAxisSort

    Add this component to an entity with a Camera2D component to change the default sorting axis.

    Namespace: Unity.Tiny.Core2D
    Syntax
    public struct Camera2DAxisSort : IComponentData

    Fields

    axis

    A sorting axis selector that uses the dot product of the camera-space position and this vector as a sorting value.

    Declaration
    public float3 axis
    Field Value
    Type Description
    float3
    Remarks

    The default z axis sorting uses (0,0,1). For negative y sorting, required for some 2D setups, use (0,-1,0). Isometric perspectives may require unusual combinations such as (1,1,0).

    Properties

    Default

    Declaration
    public static Camera2DAxisSort Default { get; }
    Property Value
    Type Description
    Camera2DAxisSort
    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