A game about forced loneliness, made by TACStudios
at master 1.1 kB view raw
1using UnityEngine; 2using UnityEditor; 3using UnityEditor.Callbacks; 4using System.IO; 5 6 7namespace TMPro 8{ 9 public class TMP_PostBuildProcessHandler 10 { 11 [PostProcessBuildAttribute(10000)] 12 public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 13 { 14 if (target == BuildTarget.iOS) 15 { 16 // Try loading the TMP Settings 17 TMP_Settings settings = Resources.Load<TMP_Settings>("TMP Settings"); 18 19 if (settings == null || TMP_Settings.enableEmojiSupport == false) 20 return; 21 22 string file = Path.Combine(pathToBuiltProject, "Trampoline", "Classes/UI/Keyboard.mm"); 23 24 if (!File.Exists(file)) 25 { 26 file = Path.Combine(pathToBuiltProject, "Classes/UI/Keyboard.mm"); 27 } 28 29 string content = File.ReadAllText(file); 30 content = content.Replace("FILTER_EMOJIS_IOS_KEYBOARD 1", "FILTER_EMOJIS_IOS_KEYBOARD 0"); 31 File.WriteAllText(file, content); 32 } 33 } 34 } 35}