Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


transparencySortMode

Transparent object sorting mode.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public TransparencySortMode transparencySortMode { get; set; }

Remarks

By default, perspective Cameras sort objects based on distance from Camera position to the object pivot; and orthographic Cameras sort based on distance along the view direction.
If you're making a 2D game with a perspective Camera, you might want to use TransparencySortMode.Orthographic sort mode so that objects are sorted based on distance along the Camera's view.
Additional Resources: TransparencySortMode enum, Camera.opaqueSortMode.