- Home /
Render Plane in front using Sorting Layers.
I am trying to create a UI in VR that is diegetic and attached to the camera. I created a new sorting layer called UI and placed it under the default in project settings. I then, using this script:
void Start () { transform.GetComponent<Renderer>().sortingLayerName = "UI"; } // Update is called once per frame void Update () { Debug.Log(transform.GetComponent<Renderer>().sortingLayerName); }
set the sorting layer to my new "UI" layer. The plane is still being rendered behind objects in the scene.
Your answer

Follow this Question
Related Questions
Sorting layer in with override canvas component 1 Answer
Drag and Drop problem with order of UI items (behind others) 1 Answer
How to make a 2D sprite always render in front of the 3D gameobjects 1 Answer
5.3 : Display particles over an Image component 1 Answer
Display UI under the actual "Gameplay"? 3 Answers