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 |