기술 자료

Unity Engine

Unity Engine

GetVariants(List<ShaderVariant>)

Populate given list with shader variants contained in collection.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

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

Parameters

List of variants to populate.

Examples

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