Fix error on running texture modifiers for text decals

This commit is contained in:
Andrew Cassidy 2020-09-28 19:55:44 -07:00
parent 885dfb3397
commit bf7d5dd933
2 changed files with 1 additions and 2 deletions

View File

@ -67,8 +67,7 @@ namespace ConformalDecals.MaterialProperties {
public override void Modify(Material material) {
if (material == null) throw new ArgumentNullException(nameof(material));
if (_texture == null) {
_texture = Texture2D.whiteTexture;
throw new NullReferenceException("texture is null, but should not be");
_texture = isNormal ? DecalConfig.BlankNormal : Texture2D.whiteTexture;
}
material.SetTexture(_propertyID, _texture);