GetVariants(List<ShaderVariant>)
Populate given list with shader variants contained in the collection.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
public void GetVariants(List<GraphicsStateCollection.ShaderVariant> results)
Parameters
ShaderVariantCollection.ShaderVariant list to be populated.
Examples
using System.Collections.Generic;using UnityEngine;using UnityEngine.Rendering;public class GetVariantsExample : MonoBehaviour{ public GraphicsStateCollection graphicsStateCollection; void Start() { List<GraphicsStateCollection.ShaderVariant> variants = new List<GraphicsStateCollection.ShaderVariant>(); graphicsStateCollection.GetVariants(variants); Debug.Log("Collection contains " + variants.Count + " variants."); }}