You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
582 B
C#
19 lines
582 B
C#
using ConformalDecals.Util;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialProperties {
|
|
public class MaterialKeywordProperty : MaterialProperty {
|
|
[SerializeField] public bool value = true;
|
|
|
|
public override void ParseNode(ConfigNode node) {
|
|
base.ParseNode(node);
|
|
|
|
value = ParseUtil.ParseBool(node, "value", true, true);
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (value) material.EnableKeyword(_propertyName);
|
|
else material.DisableKeyword(_propertyName);
|
|
}
|
|
}
|
|
} |