1
\$\begingroup\$

my outline shader was working fine but suddenly it started throwing this error. the game still works fine in the editor though but when i try to build it gets stuck on the step:

Packing assets - sharedassets0.assets

this is my shader:

Shader "Outlined/Uniform"
{
    Properties
    {
        _Color("Main Color", Color) = (0.5,0.5,0.5,1)
        _MainTex ("Texture", 2D) = "white" {}
        _OutlineColor ("Outline color", Color) = (0,0,0,1)
        _OutlineWidth ("Outlines width", Range (0.0, 2.0)) = 1.1
    }

    CGINCLUDE
    #include "UnityCG.cginc"

    struct appdata
    {
        float4 vertex : POSITION;
    };

    struct v2f
    {
        float4 pos : POSITION;
    };

    uniform float _OutlineWidth;
    uniform float4 _OutlineColor;
    uniform sampler2D _MainTex;
    uniform float4 _Color;

    ENDCG

    SubShader
    {
        Tags{ "Queue" = "Geometry + 1" "IgnoreProjector" = "True" }

        Pass //Outline
        {
            ZWrite Off
            Cull Front
            CGPROGRAM

            #pragma vertex vert
            #pragma fragment frag

            v2f vert(appdata v)
            {
                appdata original = v;
                v.vertex.xyz += _OutlineWidth * normalize(v.vertex.xyz);

                v2f o;
                o.pos = UnityObjectToClipPos(v.vertex);
                return o;

            }

            half4 frag(v2f i) : COLOR
            {
                return _OutlineColor;
            }

            ENDCG
        }

        Tags{ "Queue" = "Geometry"}

        CGPROGRAM
        #pragma surface surf Lambert

        struct Input {
            float2 uv_MainTex;
        };

        void surf (Input IN, inout SurfaceOutput o) {
            fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
            o.Albedo = c.rgb;
            o.Alpha = c.a;
        }
        ENDCG
    }
    Fallback "Diffuse"
}

i tried looking on the internet but couldn't get any help on this error.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Remove the spaces in "Queue" = "Geometry + 1", it should look like "Queue" = "Geometry+1"

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .