results | 要填充的变体列表。 |
使用集合中包含的着色器变体填充给定的列表。
using System.Collections.Generic; using UnityEngine; using UnityEngine.Experimental.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."); } }