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
581 B
C#
19 lines
581 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);
|
|
|
|
ParseUtil.ParseBoolIndirect(ref value, node, "value");
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (value) material.EnableKeyword(_propertyName);
|
|
else material.DisableKeyword(_propertyName);
|
|
}
|
|
}
|
|
} |