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 |
---|---|
| ShaderLab Integer property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", Integer) = $VALUE$$END$ Parameters
|
| ShaderLab Blend 2x multiplicative (srcdst+dstsrc) Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block Body Blend DstColor SrcColor |
| ShaderLab Float property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", Float) = $VALUE$$END$ Parameters
|
| 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
} |
| ShaderLab Shader block Scope Unity ShaderLab Root Body Shader "$NAME$"
{
$END$
} Parameters
|
| ShaderLab 3D property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", 3D) = "$TEXTURE$" { $END$ } Parameters
|
| ShaderLab Vector property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", Vector) = ($X$, $Y$, $Z$, $W$)$END$ Parameters
|
| 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 |
| ShaderLab Blend additive (src + dst) Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block Body Blend One One |
| 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
}
} |
| ShaderLab 2D property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", 2D) = "$TEXTURE$" { $END$ } Parameters
|
| 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 |
| ShaderLab CubeArray property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", CubeArray) = "$TEXTURE$" { $END$ } Parameters
|
| ShaderLab Blend multiplicative (src*dst) Scope Unity ShaderLab Category Block, Unity ShaderLab SubShader Block, Unity ShaderLab Pass Block Body Blend DstColor Zero |
| ShaderLab Cube property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", Cube) = "$TEXTURE$" { $END$ } Parameters
|
| ShaderLab 2DArray property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", 2DArray) = "$TEXTURE$" { $END$ } Parameters
|
| ShaderLab Color property Scope Unity ShaderLab Properties Block Body _$NAME$("$NAME$", Color) = ($R$, $G$, $B$, $A$)$END$ Parameters
|
| 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 |
| 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
} |
| Current file context Scope Everywhere Body $CTX$ Parameters
|
| Insert new GUID Scope Everywhere Body $GUID$ Parameters
|