Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetVariants(List<ShaderVariant>)

Populate given list with shader variants contained in the collection.
Read time 1 minuteLast updated 4 days ago

Definition

public void GetVariants(List<GraphicsStateCollection.ShaderVariant> results)

Parameters

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."); }}