- Home /
SortingLayer variable won't show in inspector
Hi, so I have this variable in my code:
public class SpriteManager : MonoBehaviour
{
[SerializeField]
public SortingLayer sortingLayer;
}
Very simple, but it won't show in the inspector, which I find weird. I use it to set the sorting layer of a group of items to one specific layer. I could fall back on making it a string and typing out the name of the layer, but I would much prefer a dropdown (which I imagine this field would look like by default) to be in the inspector just to guarantee spelling mistakes don't become a little issue.
Any idea why this isn't working?
Your answer

Follow this Question
Related Questions
[Solved] to assign a serialize-field property in other class via editor class 1 Answer
Select a type from the inspector 0 Answers
Need more flexible sorting layers 1 Answer
Render Plane in front using Sorting Layers. 0 Answers
how can i change the layer of prefab "trail renderer " . I want it under of UI 0 Answers