From fe4fb5c03ec551d9df394959eaa86f27364c4f11 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Mon, 28 Sep 2020 19:55:44 -0700 Subject: [PATCH] Fix error on running texture modifiers for text decals --- GameData/ConformalDecals/Plugins/ConformalDecals.dll | 2 +- .../MaterialProperties/MaterialTextureProperty.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/GameData/ConformalDecals/Plugins/ConformalDecals.dll index ce15110..aabe7a5 100644 --- a/GameData/ConformalDecals/Plugins/ConformalDecals.dll +++ b/GameData/ConformalDecals/Plugins/ConformalDecals.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:598ebc36f53198687a2e77dc8947c70c7b883a5e91342b52c012938c61b89382 +oid sha256:5fe350d8ceec1f3336d7610d27dc5726e854922a709465e58ba50b74ac738f16 size 81408 diff --git a/Source/ConformalDecals/MaterialProperties/MaterialTextureProperty.cs b/Source/ConformalDecals/MaterialProperties/MaterialTextureProperty.cs index 6766f3b..cfd018b 100644 --- a/Source/ConformalDecals/MaterialProperties/MaterialTextureProperty.cs +++ b/Source/ConformalDecals/MaterialProperties/MaterialTextureProperty.cs @@ -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);