A game about forced loneliness, made by TACStudios
at master 22 lines 2.3 kB view raw view rendered
1### UV Mapping 2Some [TextMesh Pro shaders](Shaders.md) allow you to apply one or more image textures to text. These options control how those textures stretch to fit the text. 3 4![Example image](../images/TMP_Object_UVMapping.png) 5 6You can also edit shader-specific texturing options in the shaders themselves. The available options depend on the shader you use. 7 8When texturing text, make sure that your texture assets have their **Wrap Mode** set to **Repeat**. Otherwise the texture is likely to be heavily distorted when applied to the text. See the [Render Texture documentation](https://docs.unity3d.com/Manual/class-RenderTexture.html) in the Unity Manual for more information. 9 10|Property:||Function:| 11|---------|-|---------| 12|**Horizontal Mapping**||Specify how textures map to text horizontally when you use a shader that supports textures.| 13||Character|Stretches the texture horizontally across each character's sprite.| 14||Line|Stretches the texture horizontally across the entire width of each line.| 15||Paragraph|Stretches the texture horizontally across the entire text.| 16||Match Aspect|Scales the texture horizontally so it maintains its aspect ratio, and is not deformed. <br/><br/> When you use this horizontal mapping mode, the **Vertical Mapping** setting determines how the texture is mapped to the text, and must be set to something other than **Match Aspect**.| 17|**Vertical Mapping**||Specify how textures map to text vertically when you use a shader that supports textures.| 18||Character|Stretches the texture vertically across each character's sprite.| 19||Line|Stretches the texture vertically across the entire width of each line.| 20||Paragraph|Stretches the texture vertically across the entire text.| 21||Match Aspect|Scales the texture vertically so it maintains its aspect ratio, and is not deformed. <br/><br/> When you use this vertical mapping mode, the **Horizontal Mapping** setting determines how the texture is mapped to the text, and must be set to something other than **Match Aspect**.| 22|**Line Offset**||When Horizontal Mapping is set to Line, **Paragraph**, or **Match Aspect**, set this value to add a horizontal texture offset to each successive line. <br/><br/> This value is added to the **Offset X** value you specify in the shader.|