diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
| commit | 3af4c218c0e70167db23a6303d2af30aff37d2fe (patch) | |
| tree | 927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs | |
| parent | b6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff) | |
| download | Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2 Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip | |
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs deleted file mode 100644 index aacab93..0000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs +++ /dev/null @@ -1,63 +0,0 @@ -using UnityEngine;
-using UnityEditor;
-using UnityEditor.Callbacks;
-using System.IO;
-
-
-namespace TMPro
-{
- public class TMP_PostBuildProcessHandler
- {
- [PostProcessBuildAttribute(10000)]
- public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
- {
- // Check if TMP Essential Resource are present in user project.
- if (target == BuildTarget.iOS && File.Exists(GetEssentialProjectResourcesPath() + "/Resources/TMP Settings.asset") && TMP_Settings.enableEmojiSupport)
- {
- string file = Path.Combine(pathToBuiltProject, "Classes/UI/Keyboard.mm");
- string content = File.ReadAllText(file);
- content = content.Replace("FILTER_EMOJIS_IOS_KEYBOARD 1", "FILTER_EMOJIS_IOS_KEYBOARD 0");
- File.WriteAllText(file, content);
- }
- }
-
-
- private static string GetEssentialProjectResourcesPath()
- {
- // Find the potential location of the TextMesh Pro folder in the user project.
- string projectPath = Path.GetFullPath("Assets/..");
- if (Directory.Exists(projectPath))
- {
- // Search for default location of TMP Essential Resources
- if (Directory.Exists(projectPath + "/Assets/TextMesh Pro/Resources"))
- {
- return "Assets/TextMesh Pro";
- }
-
- // Search for potential alternative locations in the user project
- string[] matchingPaths = Directory.GetDirectories(projectPath, "TextMesh Pro", SearchOption.AllDirectories);
- projectPath = ValidateLocation(matchingPaths, projectPath);
- if (projectPath != null) return projectPath;
- }
-
- return null;
- }
-
-
- private static string ValidateLocation(string[] paths, string projectPath)
- {
- for (int i = 0; i < paths.Length; i++)
- {
- // Check if any of the matching directories contain a GUISkins directory.
- if (Directory.Exists(paths[i] + "/Resources"))
- {
- string folderPath = paths[i].Replace(projectPath, "");
- folderPath = folderPath.TrimStart('\\', '/');
- return folderPath;
- }
- }
-
- return null;
- }
- }
-}
|
