From c85409e56ff09607244061c59518f5d1f460a918 Mon Sep 17 00:00:00 2001 From: mob-sakai Date: Sun, 15 May 2022 15:47:17 +0900 Subject: [PATCH] fix: support TextMeshPro v2 or later --- .../Resources/TMP_SDF (SoftMaskable).shader | 5 +++++ .../Resources/TMP_SDF-Mobile (SoftMaskable).shader | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Samples~/TextMeshPro Support/Resources/TMP_SDF (SoftMaskable).shader b/Samples~/TextMeshPro Support/Resources/TMP_SDF (SoftMaskable).shader index caaf88f..64e0285 100644 --- a/Samples~/TextMeshPro Support/Resources/TMP_SDF (SoftMaskable).shader +++ b/Samples~/TextMeshPro Support/Resources/TMP_SDF (SoftMaskable).shader @@ -124,8 +124,13 @@ SubShader { #include "UnityCG.cginc" #include "UnityUI.cginc" +#if UNITY_VERSION < 201910 #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" #include "Assets/TextMesh Pro/Resources/Shaders/TMPro.cginc" +#else + #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" + #include "Assets/TextMesh Pro/Shaders/TMPro.cginc" +#endif #include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc" #pragma shader_feature __ SOFTMASK_EDITOR diff --git a/Samples~/TextMeshPro Support/Resources/TMP_SDF-Mobile (SoftMaskable).shader b/Samples~/TextMeshPro Support/Resources/TMP_SDF-Mobile (SoftMaskable).shader index 84a3ed1..0ee3e5b 100644 --- a/Samples~/TextMeshPro Support/Resources/TMP_SDF-Mobile (SoftMaskable).shader +++ b/Samples~/TextMeshPro Support/Resources/TMP_SDF-Mobile (SoftMaskable).shader @@ -93,7 +93,11 @@ SubShader { #include "UnityCG.cginc" #include "UnityUI.cginc" +#if UNITY_VERSION < 201910 #include "Assets/TextMesh Pro/Resources/Shaders/TMPro_Properties.cginc" +#else + #include "Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc" +#endif #include "Packages/com.coffee.softmask-for-ugui/Shaders/SoftMask.cginc" #pragma shader_feature __ SOFTMASK_EDITOR