mob-sakai / SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
https://github.com/mob-sakai/SoftMaskForUGUI
MIT License
1.97k stars 261 forks source link

Shaders not found when using TextMeshPro as a package #92

Closed oxysoft closed 3 years ago

oxysoft commented 4 years ago

Describe the bug

Shader error in 'Hidden/TextMeshPro/Distance Field (SoftMaskable)': failed to open source file: 'Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc' at line 127 (on d3d11)
Compiling Vertex program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

To Reproduce Steps to reproduce the behavior:

  1. Import TextMeshPro and SoftMaskForUGUI from the package manager.
  2. Import the TextMeshPro support for SoftMaskForUGUI.
  3. Try to use a TextMeshProUGUI component with SoftMaskable.
  4. Get pink text with the error above.

Environment (please complete the following information):

mob-sakai commented 4 years ago

You must import TMP Essential Resources in order to use TextMeshPro. They include shaders, fonts, etc.

  1. Select Window > TextMeshPro > Import TMP Essential Resources from menu

  2. Press the Import button in the Import dialog

  3. If the shader error is not resolved, reimport the shader.
    Or, import the TextMeshPro Support again.

I'll add to the readme later.