文档

Unity Engine

Unity Engine

GetVariants(List<ShaderVariant>)

Populate given list with shader variants contained in the collection.
阅读时间1 分钟最后更新于 1 个月前

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