1- using BepInEx ;
2- using BepInEx . Configuration ;
3- using BepInEx . IL2CPP ;
4- using BepInEx . IL2CPP . Utils . Collections ;
5- using System ;
1+ using System ;
62using System . Collections ;
73using System . Diagnostics ;
84using System . Runtime . InteropServices ;
95using System . Text ;
6+ using BepInEx . IL2CPP ;
7+ using BepInEx . IL2CPP . Utils . Collections ;
8+ using BepInEx . Configuration ;
109using UnhollowerRuntimeLib ;
1110using UnityEngine ;
1211
13- namespace EnableResizeIL2CPP_netFm
12+ namespace BepInEx
1413{
1514 /// <summary>
1615 /// Enable window resizing in windowed mode.
1716 /// </summary>
1817 [ BepInPlugin ( GUID , PluginName , PluginVersion ) ]
1918 public class EnableResize : BasePlugin
2019 {
21- internal const string GUID = "SpockBauru .EnableResizeIL2CPP_netFm" ;
20+ internal const string GUID = "BepInEx .EnableResizeIL2CPP_netFm" ;
2221 internal const string PluginName = "Enable Resize" ;
23- internal const string PluginVersion = "0.6 " ;
22+ internal const string PluginVersion = "0.7 " ;
2423
25- //Game Object shared between all SpockPlugins_BepInEx plugins
26- public GameObject SpockBauru ;
24+ //Game Object shared between all BepInExUtility plugins
25+ public GameObject BepInExUtility ;
2726
2827 internal static ConfigEntry < bool > ConfigEnableResize { get ; private set ; }
2928
@@ -34,15 +33,15 @@ public override void Load()
3433 //IL2CPP don't automatically inherits Monobehavior, so needs to add separatelly
3534 ClassInjector . RegisterTypeInIl2Cpp < EnableResizeComponent > ( ) ;
3635
37- SpockBauru = GameObject . Find ( "SpockBauru " ) ;
38- if ( SpockBauru == null )
36+ BepInExUtility = GameObject . Find ( "BepInExUtility " ) ;
37+ if ( BepInExUtility == null )
3938 {
40- SpockBauru = new GameObject ( "SpockBauru " ) ;
41- GameObject . DontDestroyOnLoad ( SpockBauru ) ;
42- SpockBauru . hideFlags = HideFlags . HideAndDontSave ;
43- SpockBauru . AddComponent < EnableResizeComponent > ( ) ;
39+ BepInExUtility = new GameObject ( "BepInExUtility " ) ;
40+ GameObject . DontDestroyOnLoad ( BepInExUtility ) ;
41+ BepInExUtility . hideFlags = HideFlags . HideAndDontSave ;
42+ BepInExUtility . AddComponent < EnableResizeComponent > ( ) ;
4443 }
45- else SpockBauru . AddComponent < EnableResizeComponent > ( ) ;
44+ else BepInExUtility . AddComponent < EnableResizeComponent > ( ) ;
4645 }
4746 }
4847
@@ -80,7 +79,7 @@ public EnableResizeComponent(IntPtr handle) : base(handle) { }
8079 private const int WS_SYSMENU = 0x80000 ;
8180 private const int WS_THICKFRAME = 0x40000 ;
8281
83- private const string GET_CLASS_NAME_MAGIC = "UnityWndClass" ; //How Anon got this???
82+ private const string GET_CLASS_NAME_MAGIC = "UnityWndClass" ;
8483 private IntPtr WindowHandle = IntPtr . Zero ;
8584
8685 private int windowStyle = 0 ;
0 commit comments