Fix error on running texture modifiers for text decals

pull/21/head
Andrew Cassidy 4 years ago
parent af8bb8c170
commit fe4fb5c03e
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:598ebc36f53198687a2e77dc8947c70c7b883a5e91342b52c012938c61b89382
oid sha256:5fe350d8ceec1f3336d7610d27dc5726e854922a709465e58ba50b74ac738f16
size 81408

@ -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);

Loading…
Cancel
Save