Class EnumKeyword<TEnum>
A serialized enum that drives one shader_feature keyword from a fixed set, based on its
current value. Subclass and override Keywords to name them (positional,
matching the enum's underlying int values; use "_" for a value that maps to no
keyword) - identity is code, not serialized data.
[Serializable]
public abstract class EnumKeyword<TEnum> : IShaderFeatureKeyword where TEnum : struct, Enum
Type Parameters
TEnum
- Inheritance
-
EnumKeyword<TEnum>
- Implements
- Derived
- Inherited Members
Properties
ActiveKeywords
The shader_feature keywords currently active, given this field's current value.
public IEnumerable<string> ActiveKeywords { get; }
Property Value
Keywords
The shader_feature keywords, indexed by the enum's underlying int value.
public abstract string[] Keywords { get; }
Property Value
- string[]
Value
The current enum value.
public TEnum Value { get; set; }
Property Value
- TEnum
Operators
implicit operator TEnum(EnumKeyword<TEnum>)
public static implicit operator TEnum(EnumKeyword<TEnum> enumKeyword)
Parameters
enumKeywordEnumKeyword<TEnum>
Returns
- TEnum