Unity - Scripting API: Rendering.RayTracingShader.enabledKeywords
Success!
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
public LocalKeyword[] enabledKeywords;
Description
An array containing the local shader keywords that are currently enabled for this ray tracing shader.
using UnityEngine; using UnityEngine.Rendering;public class Example : MonoBehaviour { public RayTracingShader rayTracingShader;
private void Start() { foreach (var localKeyword in rayTracingShader.enabledKeywords) { Debug.Log("Local shader keyword " + localKeyword.name + " is currently enabled"); } } }