Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CustomAxis

Sort objects based on distance along a custom axis.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Field
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
CustomAxis = 3

Remarks

Transparent objects are sorted based on distance along a custom axis. For example, you could specify this mode and the axis to be (0.0f, 1.0f, 0.0f). This will effectively make renderers sorted to the back as they go up in Y. This is a common feature of 2.5D games.
Note: This has a lower priority compared to other sorting criterias such as SortingLayer.