URP Setup
Detailed setup for URP
Configure Universal Render Pipeline
-
Open your
Universal Renderer Dataasset- you can find the location through
Universal Renderer Pipeline Asset → Renderer List.
- you can find the location through
-
In the
Renderer Featuressection:- click
Add Renderer Feature → Decal. - click
Add Renderer Feature → Text Decal.
- click
-
Set
Decal Techniqueto eitherDBufferorScreen Space.
Set Up TextMesh Pro with Decal Shader
-
Create TMP_Font Asset:
- Select the font you want to use in the Project window.
- Right-click the font and choose
Create → TextMeshPro → Font Asset → SDF. - This will generate a
TMP_Font Asset.
-
Assign Text Decal Shader to the font asset:
- Select the created
TMP_Font Asset. - In the Inspector, locate the
Atlas & Material, double click to theFont Materialfield value. - Click the shader dropdown and choose one of the following:
Text Decal/Distance Field SSD Unlit– Use for unlit rendering.Text Decal/Distance Field SSD URP Lit– Use for lit rendering.
- Select the created
Using the Text Decal in the Scene
- Add a 3D TextMeshPro object to your scene
Game Object → 3D Object → Text - TextMeshPro. - Attach the
Text Decalscript to the object by clickingAdd Componentin the Inspector:- You can find the script at:
Packages/Text Decal/Runtime/TextDecal.cs
- You can find the script at:
- Assign the
TMP_Font Assetyou created with the shader applied- by selecting it in the
Font Assetproperty of theTextMeshPro - Textcomponent.
- by selecting it in the
- Adjust
Projection DepthandRendering Layersin the Inspector:-
Projection Depthcontrols how far the decal projection extends. -
Rendering Layers allows you to control where the decal appears.
-