Permalink
Browse files

add error message when shader is not found

  • Loading branch information...
Elringus committed Nov 5, 2017
1 parent f8a1e5c commit c7f43db0ab8fa9309435fb7ea2606b90ec428977
Showing with 2 additions and 0 deletions.
  1. +2 −0 Assets/SpriteGlow/SpriteGlowMaterial.cs
@@ -16,6 +16,8 @@ public class SpriteGlowMaterial : Material
public SpriteGlowMaterial (Texture spriteTexture, bool drawOutside = false, bool instancingEnabled = false)
: base(OUTLINE_SHADER)
{
if (!OUTLINE_SHADER) Debug.LogError(string.Format("{0} shader not found. Make sure the shader is included to the build.", OUTLINE_SHADER_NAME));
mainTexture = spriteTexture;
if (drawOutside) EnableKeyword(OUTSIDE_MATERIAL_KEYWORD);
if (instancingEnabled) enableInstancing = true;

0 comments on commit c7f43db

Please sign in to comment.