Search Unity

Unity 2019.3.4f1: Shader error in 'TextMeshPro/Mobile/Distance Field': failed to open source file: '

Discussion in 'UGUI & TextMesh Pro' started by roseportalgames, Mar 10, 2020.

  1. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    Hi everyone,
    After upgrading from 2019.1 to 2019.3.4f1 I get this error when creating an Android build:
    Shader error in 'TextMeshPro/Mobile/Distance Field': failed to open source file: 'TMPro_Properties.cginc' at line 90 (on gles)
    I've checked that I have the latest TMPro version, I've deleted the package and reinstalled, I've re-imported, I've done the GUI mapping, I've made sure my build setting is NET 4
    Nothing works! :-/
     
    Last edited: Mar 10, 2020
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The TMP Essential Resources were updated in the latest releases of the TMP package to add new functionality to the shaders.

    In previous releases, these shaders were located in "TextMesh Pro/Resources/Shaders/...". They are not located in "TextMesh Pro/Shaders/..."

    To address this, you can simply re-import the TMP Essential Resources via the "Window - TextMeshPro - Import ..." menu. This will enable you to see what files have changed and which to update.

    Please be sure to remember if you changed any of the settings in the TMP Settings file as it might get replaced if you select to re-import it.

    Alternatively, if you didn't save anything inside the "TextMesh Pro" folder, you could delete it and re-import the whole TMP Essential Resources. The main benefit is moving the shaders outside of the Resources folder to prevent unused shaders from being included in a build.
     
    roseportalgames likes this.
  3. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    Hi Stephan, thank you for your reply. Unfortunately I still get the error after clicking import TMP Essential Resources. I've also already tried deleting the entire folder.

    Please allow me to show you my entire log in case it helps:

    Code (CSharp):
    1. Shader error in 'TextMeshPro/Mobile/Distance Field': failed to open source file: 'TMPro_Properties.cginc' at line 90 (on gles)
    2.  
    3. Compiling Vertex program
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING
    5.  
    6.  
    7.  
    8.  
    9.  
    10.  
    11.  
    12. Shader error in 'TextMeshPro/Mobile/Distance Field': failed to open source file: 'TMPro_Properties.cginc' at line 90 (on gles3)
    13.  
    14. Compiling Vertex program
    15. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    16.  
    17.  
    18.  
    19.  
    20.  
    21.  
    22.  
    23.  
    24.  
    25.  
    26. Failed running C:\Program Files\Unity\Hub\Editor\2019.3.4f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="D:\Unity\Projects\21CC Player Project - Upgrade Test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="D:\Unity\Projects\21CC Player Project - Upgrade Test\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.3.4f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Program Files/Unity/Hub/Editor/2019.3.4f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Program Files/Unity/Hub/Editor/2019.3.4f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/android-ndk-r19c" --profiler-report --map-file-parser="C:/Program Files/Unity/Hub/Editor/2019.3.4f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory="D:/Unity/Projects/21CC Player Project - Upgrade Test/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="D:/Unity/Projects/21CC Player Project - Upgrade Test/Temp/StagingArea/Il2Cpp/il2cppOutput"
    27.  
    28. stdout:
    29. Building libil2cpp.so with AndroidToolChain
    30.     Output directory: D:\Unity\Projects\21CC Player Project - Upgrade Test\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
    31.     Cache directory: D:\Unity\Projects\21CC Player Project - Upgrade Test\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
    32. il2cpp.exe didn't catch exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    33.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    34.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    35.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    36.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)
    37.   --- End of inner exception stack trace ---
    38.   at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    39.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    40.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    41.   at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    42.   at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    43.   at il2cpp.Program.Main(String[] args)
    44. ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    45.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    46.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    47.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    48.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    49.  
    50. ---> (Inner Exception #1) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    51.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    52.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    53.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    54.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    55.  
    56. ---> (Inner Exception #2) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    57.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    58.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    59.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    60.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    61.  
    62. ---> (Inner Exception #3) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    63.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    64.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    65.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    66.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    67.  
    68. ---> (Inner Exception #4) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    69.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    70.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    71.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    72.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    73.  
    74. ---> (Inner Exception #5) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    75.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    76.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    77.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    78.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    79.  
    80. ---> (Inner Exception #6) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    81.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    82.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    83.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    84.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    85.  
    86. ---> (Inner Exception #7) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    87.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    88.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    89.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    90.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    91.  
    92. ---> (Inner Exception #8) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    93.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    94.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    95.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    96.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    97.  
    98. ---> (Inner Exception #9) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    99.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    100.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    101.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    102.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    103.  
    104. ---> (Inner Exception #10) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    105.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    106.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    107.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    108.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    109.  
    110. ---> (Inner Exception #11) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
    111.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    112.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    113.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    114.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)<---
    115.  
    116. stderr:
    117.  
    118. Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
    119.   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
    120.   at Unity.IL2CPP.Shell.Execute(ExecuteArgs executeArgs, IExecuteController controller)
    121.   at Unity.IL2CPP.Building.CppProgramBuilder.ProvideObjectFile(IntermediateObjectFileCompilationData data)
    122.   at Unity.IL2CPP.Building.ParallelFor.<>c__DisplayClass1_0`2.<RunWithResult>b__0(Object o)
    123.   --- End of inner exception stack trace ---
    124.   at Unity.IL2CPP.Building.ParallelFor.RunWithResult[D,T](D[] data, Func`2 action)
    125.   at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector)
    126.   at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
    127.   at il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies)
    128.   at il2cpp.Program.Run(String[] args, Boolean setInvariantCulture)
    129.   at il2cpp.Program.Main(String[] args)
    130.  
    131. UnityEngine.Debug:LogError(Object)
    132. UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
    133. UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
    134. UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String)
    135. UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean)
    136. UnityEditorInternal.IL2CPPBuilder:Run()
    137. UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
    138. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    139.  
    140.  
    141.  
    142.  
    143.  
    144.  
    145.  
    146.  
    147.  
    148.  
    149.  
    150. Exception: C:\Program Files\Unity\Hub\Editor\2019.3.4f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly!
    151. UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    152. UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    153. UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    154. UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    155. UnityEditorInternal.IL2CPPBuilder.Run () (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    156. UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    157. UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8656af08553f4582a8969c722a26e39b>:0)
    158. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <8656af08553f4582a8969c722a26e39b>:0)
    159. UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <8656af08553f4582a8969c722a26e39b>:0)
    160. UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <8656af08553f4582a8969c722a26e39b>:0)
    161. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <d0ffe769b7a34b4cac3a7cdc5c696293>:0)
    162. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    163.  
    164.  
    165.  
    166.  
    167.  
    168.  
    169.  
    170.  
    171.  
    172.  
    173.  
    174. Build completed with a result of 'Failed'
    175. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    176.  
    177.  
    178.  
    179.  
    180.  
    181.  
    182.  
    183.  
    184.  
    185. UnityEditor.BuildPlayerWindow+BuildMethodException: 5 errors
    186.  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00275] in <d0ffe769b7a34b4cac3a7cdc5c696293>:0
    187.  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <d0ffe769b7a34b4cac3a7cdc5c696293>:0
    188. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    189.  
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    See if you get the same error creating a new / empty project.

    Make sure you are using version 2.1.0-preview.7 of the TMP package. Then import the TMP Essential Resources and TMP Examples & Extras. Then build one of the examples like 23 - Animating Vertex Attributes on Android.
     
  5. roseportalgames

    roseportalgames

    Joined:
    Aug 9, 2017
    Posts:
    173
    I don't get the same error with an empty project of course. ^_^;

    1. Update to 2.1.0.-preview.7
    2. Clicked Import TMP Essential Resources
    3. Clicked Import TMP Examples & Extras
    4. Building scene only 23 - Animating Vertex Attributes

    I still get the 2 error messages but my build builds successfully? :eek:
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you still get the same errors in the new project?

    What errors do you get now?
     
  7. codemaker2015

    codemaker2015

    Joined:
    Aug 19, 2018
    Posts:
    27
    Try to delete the TextMeshPro folder from the project directory and import it again in the scene.