Hi there,
I want to set the sortingLayerID of an objects renderer, via renderer.sortingLayerID = some_int; My understanding on how to get the int, is to use int layer = LayerMask.NameToLayer(“nameOfLayerIWant”);
My issue is that I am getting a return value of layer = -1. This despite having this particular layer, set in the ProjectSettings, see pics.
Any thoughts?
Thanks

