Shader Is Keyword Enabled#
Rendering / Shader / Shader Is Keyword Enabled Keyword
Description#
Compares the Is Keyword Enabled static method of Shader class to another value
Parameters#
| Name | Description |
|---|---|
| Keyword |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Shader Is Keyword Enabled")]
[Category("Rendering/Shader/Is Keyword Enabled", "Keyword")]
[Description("Compares the Is Keyword Enabled static method of Shader class to another value")]
[Image(typeof(IconShader), ColorTheme.Type.Yellow)]
[Keywords("Shader, Global, Material, Keyword")]
[Parameter("Keyword")]
[Serializable]
public class GenConditionBool_Shader_CheckIsKeywordEnabled_1_StringKeyword : Condition
{
[SerializeField] private GetString m_Keyword = new GetString();
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Shader");
string method = TextUtils.ThemeAsKeyword("Is Keyword Enabled");
return $"{className} {method} ({this.m_Keyword})";
}
protected override bool Run(Args args)
{
bool value = Shader.IsKeywordEnabled(
(string) this.m_Keyword.Get(args)
);
return value;
}
}
}