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.
CloseFor 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.
Closeshader | Shader used in the variant. |
passId | PassIdentifier used in the variant. |
keywords | Array of keywords used in the variant. |
results | List of graphics states to populate. |
variant | The input variant. |
Populate given list with graphics states associated with input shader variant.
using System.Collections.Generic; using UnityEngine; using UnityEngine.Experimental.Rendering;
public class GetGraphicsStatesExample : MonoBehaviour { public GraphicsStateCollection graphicsStateCollection;
void Start() { List<GraphicsStateCollection.ShaderVariant> variants = new List<GraphicsStateCollection.ShaderVariant>(); graphicsStateCollection.GetVariants(variants); foreach (var variant in variants) { List<GraphicsStateCollection.GraphicsState> states = new List<GraphicsStateCollection.GraphicsState>(); graphicsStateCollection.GetGraphicsStatesForVariant(variant, states); } } }