renderQueue
Render queue of this material.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public int renderQueue { get; set; }
Remarks
By default materials use render queue of the shader it uses. You can override the render queue used using this variable. Note that if a shader on the material is changed, the render queue resets to that of the shader itself.
Render queue value should be in [0..5000] range to work properly; or -1 to use the render queue from the shader.
Note: When Unity runs in batch mode, it does not load Scriptable Render Pipelines (SRPs) until the first time something renders. Loading an SRP modifies the sub-shader selected for a given material which can lead to the value this function returns being different than expected.