Riku

The SortingOrder and OrderInLayer appear to be exposed as public variable in the inspector for the SkeletonAnimation script. However, I cannot manage to access them via any code pulling in the SkeletonAnimation component.



Does anyone know how to access these in script? I need to change both during runtime for my game.
Riku
  • Postovi: 8

Pharan

Those items in the inspector are purely shortcuts to the MeshRenderer's sorting properties.
Just change MeshRenderer's sorting layer and sorting order in code.

Despite being hidden in the inspector, those values are also serialized as part of MeshRenderer's object, not SkeletonAnimation.
Avatar
Pharan
  • Postovi: 5366


Natrag na Unity