ReSharper 2025.1 Help

Predefined Live Templates for Unity

This topic lists all predefined live templates for Unity in ReSharper 2025.1. For more information about live templates, refer to Create source code using live templates.

Template

Details

int

ShaderLab Integer property

Scope Unity ShaderLab Properties Block

Body

_$NAME$("$NAME$", Integer) = $VALUE$$END$

Parameters

  • NAME - no macro

  • VALUE - Evaluates to the specified constant value

  • END - The caret position after the template is applied.

blendmultiplicative2x

ShaderLab Blend 2x multiplicative (srcdst+dstsrc)

Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

Body

Blend DstColor SrcColor

    float

    ShaderLab Float property

    Scope Unity ShaderLab Properties Block

    Body

    _$NAME$("$NAME$", Float) = $VALUE$$END$

    Parameters

    • NAME - no macro

    • VALUE - Evaluates to the specified constant value

    • END - The caret position after the template is applied.

    surf

    ShaderLab Surface Shader

    Scope Unity ShaderLab Shader Block

    Body

    SubShader { Tags { "RenderType" = "Opaque" } CGPROGRAM #pragma surface surf Lambert struct Input { float4 color : COLOR; }; void surf(Input IN, inout SurfaceOutput o) { o.Albedo = 1; } ENDCG }

      shader

      ShaderLab Shader block

      Scope Unity ShaderLab Root

      Body

      Shader "$NAME$" { $END$ }

      Parameters

      • NAME - no macro

      • END - The caret position after the template is applied.

      tex3d

      ShaderLab 3D property

      Scope Unity ShaderLab Properties Block

      Body

      _$NAME$("$NAME$", 3D) = "$TEXTURE$" { $END$ }

      Parameters

      • NAME - no macro

      • TEXTURE - Evaluates to the specified constant value

      • END - The caret position after the template is applied.

      vec

      ShaderLab Vector property

      Scope Unity ShaderLab Properties Block

      Body

      _$NAME$("$NAME$", Vector) = ($X$, $Y$, $Z$, $W$)$END$

      Parameters

      • NAME - no macro

      • X - Evaluates to the specified constant value

      • Y - Evaluates to the specified constant value

      • Z - Evaluates to the specified constant value

      • W - Evaluates to the specified constant value

      • END - The caret position after the template is applied.

      blendadditivesoft

      ShaderLab Blend soft additive (src*(1-dst)+dst)

      Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

      Body

      Blend OneMinusDstColor One

        blendadditive

        ShaderLab Blend additive (src + dst)

        Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

        Body

        Blend One One

          vfshader

          ShaderLab Vertex/Fragment Shader

          Scope Unity ShaderLab Shader Block

          Body

          SubShader { Tags { "RenderType"="Opaque" } Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; }; struct v2f { float4 vertex : SV_POSITION; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); return o; } half4 frag (v2f i) : SV_Target { return 1; } ENDCG } }

            tex2d

            ShaderLab 2D property

            Scope Unity ShaderLab Properties Block

            Body

            _$NAME$("$NAME$", 2D) = "$TEXTURE$" { $END$ }

            Parameters

            • NAME - no macro

            • TEXTURE - Evaluates to the specified constant value

            • END - The caret position after the template is applied.

            blendtransparent

            ShaderLab Blend traditional transparency (src*srcAlpha+(1-srcAlpha)*dst)

            Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

            Body

            Blend SrcAlpha OneMinusSrcAlpha

              cubearr

              ShaderLab CubeArray property

              Scope Unity ShaderLab Properties Block

              Body

              _$NAME$("$NAME$", CubeArray) = "$TEXTURE$" { $END$ }

              Parameters

              • NAME - no macro

              • TEXTURE - Evaluates to the specified constant value

              • END - The caret position after the template is applied.

              blendmultiplicative

              ShaderLab Blend multiplicative (src*dst)

              Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

              Body

              Blend DstColor Zero

                cube

                ShaderLab Cube property

                Scope Unity ShaderLab Properties Block

                Body

                _$NAME$("$NAME$", Cube) = "$TEXTURE$" { $END$ }

                Parameters

                • NAME - no macro

                • TEXTURE - Evaluates to the specified constant value

                • END - The caret position after the template is applied.

                tex2darr

                ShaderLab 2DArray property

                Scope Unity ShaderLab Properties Block

                Body

                _$NAME$("$NAME$", 2DArray) = "$TEXTURE$" { $END$ }

                Parameters

                • NAME - no macro

                • TEXTURE - Evaluates to the specified constant value

                • END - The caret position after the template is applied.

                color

                ShaderLab Color property

                Scope Unity ShaderLab Properties Block

                Body

                _$NAME$("$NAME$", Color) = ($R$, $G$, $B$, $A$)$END$

                Parameters

                • NAME - no macro

                • R - Evaluates to the specified constant value

                • G - Evaluates to the specified constant value

                • B - Evaluates to the specified constant value

                • A - Evaluates to the specified constant value

                • END - The caret position after the template is applied.

                blendtransparentpremul

                ShaderLab Blend premultiplied transparency (src+(1-srcAlpha)*dst)

                Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block

                Body

                Blend One OneMinusSrcAlpha

                  vfpass

                  ShaderLab Vertex/Fragment Shader Pass

                  Scope Unity ShaderLab SubShader Block

                  Body

                  Pass { CGPROGRAM #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" struct appdata { float4 vertex : POSITION; }; struct v2f { float4 vertex : SV_POSITION; }; v2f vert (appdata v) { v2f o; o.vertex = UnityObjectToClipPos(v.vertex); return o; } half4 frag (v2f i) : SV_Target { return 1; } ENDCG }

                    ctx

                    Current file context

                    Scope Everywhere

                    Body

                    $CTX$

                    Parameters

                    • CTX - Provides a list of items describing current context. This includes file name, containing type name, namespace name, etc.

                    nguid

                    Insert new GUID

                    Scope Everywhere

                    Body

                    $GUID$

                    Parameters

                    • GUID - Generates a new Globally Unique Identifier (GUID)

                    Last modified: 31 March 2025