Unity - Scripting API: Rendering.RenderQueue.Geometry

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Geometry is a predefined render queue that Unity uses for opaque geometry.

using UnityEngine;
using UnityEngine.Rendering;

public class RenderQueueExample : MonoBehaviour { public Material material; public int renderQueueOffset;

void Start() { if (material != null) { // Adjust the render queue using the specified offset material.renderQueue = (int)(RenderQueue.Geometry + renderQueueOffset); } } }

Assigns a custom render queue to a material, to force the sorting of objects rendered with this material.