Simple single colour shader in unity with transparency

It’s kind of annoying that Unity doesn’t come with an unlit color shader that you can change the alpha value. So here one is. Instructions:

  1. From the ‘Create’ menu in the ‘Project’ window, select ‘Shader’ => ‘Unlit Shader’.

  2. Open the file that is created and copy paste the below.

  3. Finally, drag your shader onto your material, or select the shader in the material in the inspector window.

Shader "Unlit/Transparent Colored" {
    Properties {
        _Color ("Main Color", Color) = (1,1,1,1)
    }

    SubShader {
        Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
        
        ZWrite Off
        Lighting Off
        Fog { Mode Off }

        Blend SrcAlpha OneMinusSrcAlpha 

        Pass {
            Color [_Color]
        }
    }
}