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.
20 lines
579 B
C#
20 lines
579 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace ConformalDecals.MaterialProperties {
|
|
public class MaterialColorProperty : MaterialProperty {
|
|
[SerializeField] public Color color;
|
|
|
|
public override void ParseNode(ConfigNode node) {
|
|
base.ParseNode(node);
|
|
|
|
color = ParsePropertyColor(node, "color", true, color);
|
|
}
|
|
|
|
public override void Modify(Material material) {
|
|
if (material == null) throw new ArgumentNullException("material cannot be null");
|
|
|
|
material.SetColor(_propertyID, color);
|
|
}
|
|
}
|
|
} |