Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Shader error in 'TextMeshPro/Mobile/Distance Field

Discussion in 'UGUI & TextMesh Pro' started by ivyxnite, Nov 26, 2022.

  1. ivyxnite


    Oct 10, 2022
    I'm new to game development/coding and have absolutely no idea what I'm doing. I followed a tutorial on making a platformer game and tried to build and run my game but ran into these errors:

    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002da] in <0d6ce211ebbc47e1a35a84c3672ff58f>:0
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <0d6ce211ebbc47e1a35a84c3672ff58f>:0
    4. UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()
    Code (CSharp):
    1. Shader error in 'TextMeshPro/Mobile/Distance Field': Couldn't open include file 'TMPro_Properties.cginc'. at line 93
    Code (CSharp):
    1. Error building Player: Shader error in 'TextMeshPro/Mobile/Distance Field': Couldn't open include file 'TMPro_Properties.cginc'. at line 93

    I've already tried deleting and reimporting TextMeshPro several times but am unsure of what to do next.
    I'm using version 2021.3.9f1
  2. Stephan_B


    Feb 26, 2017
    The shader error is usually due to some import issue or the shaders being split into different folders.

    First, delete the "TextMesh Pro" folder from inside your project.

    Second, I would suggest updating to the latest release of the TMP package which is version 3.2.0-pre.3.. This package can be added manually in case it is not visible in package manager.


    Once the new package has been installed, you will need to import the TMP Essential Resources which contain the shaders. The TMP Essential Resources can be import by using the "Window - TextMeshPro - Import TMP Essential Resources" menu.