@@ -10,19 +10,24 @@ class Program
1010 {
1111 // When the editor is currently using the light theme, you'll find the light pattern. If it's set to the dark pattern, you'll find the dark one.
1212 // Patterns are for the Windows build of Unity, version 2019.2.3f1.
13- private static readonly byte [ ] _lightPattern = { 0x74 , 0x15 , 0x33 , 0xC0 , 0xEB , 0x13 , 0x90 , 0x49 } ;
14- private static readonly byte [ ] _darkPattern = { 0x75 , 0x15 , 0x33 , 0xC0 , 0xEB , 0x13 , 0x90 , 0x49 } ;
13+ private static byte [ ] _lightPattern = { 0x74 , 0x15 , 0x33 , 0xC0 , 0xEB , 0x13 , 0x90 , 0x49 } ;
14+ private static byte [ ] _darkPattern = { 0x75 , 0x15 , 0x33 , 0xC0 , 0xEB , 0x13 , 0x90 , 0x49 } ;
1515
1616 internal static void Main ( string [ ] args )
1717 {
1818 var themeName = string . Empty ;
1919 var help = false ;
2020 var fileLocation = @"C:\Program Files\Unity\Editor\Unity.exe" ;
21+ var mac = false ;
2122
2223 var optionSet = new OptionSet
2324 {
2425 { "theme=|t=" , "The theme to be applied to the Unity." , v => themeName = v } ,
2526 { "exe=|e=" , "The location of the Unity Editor executable." , v => fileLocation = v } ,
27+ {
28+ "mac" , "Specifies if the patcher should treat the specified executable as a MacOS executable." ,
29+ v => mac = v != null
30+ } ,
2631 { "help|h" , v => help = v != null }
2732 } ;
2833
@@ -68,6 +73,13 @@ internal static void Main(string[] args)
6873 return ;
6974 }
7075
76+ if ( mac )
77+ {
78+ // Unity 2019.1.0f2 on MacOS.
79+ _lightPattern = new byte [ ] { 0x74 , 0x03 , 0x41 , 0x8b , 0x06 , 0x48 } ;
80+ _darkPattern = new byte [ ] { 0x75 , 0x03 , 0x41 , 0x8b , 0x06 , 0x48 } ;
81+ }
82+
7183 Console . WriteLine ( $ "Opening Unity executable from { fileLocation } ...") ;
7284
7385 try
0 commit comments