File tree 1 file changed +11
-5
lines changed
src/UnityDebuggerAssistant
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
- using BepInEx ;
1
+ using BepInEx ;
2
2
using BepInEx . Logging ;
3
3
using HarmonyLib ;
4
4
using MonoMod . RuntimeDetour ;
5
+ using UnityDebuggerAssistant . Components ;
5
6
using UnityDebuggerAssistant . Patches ;
6
7
using UnityDebuggerAssistant . Utils ;
7
8
using UnityEngine ;
@@ -19,6 +20,7 @@ you in your first CSharp plugin!
19
20
public class Plugin : BaseUnityPlugin
20
21
{
21
22
public static ManualLogSource Log = null ! ;
23
+ internal static Plugin Instance = null ! ;
22
24
23
25
private void Awake ( )
24
26
{
@@ -38,13 +40,17 @@ We assign it here
38
40
ILHook . OnDetour += MonoModPatchListener . ListenForPatch ;
39
41
40
42
Harmony harmony = new ( LCMPluginInfo . PLUGIN_GUID ) ;
41
- harmony . PatchAll ( typeof ( StartOfRoundPatches ) ) ;
42
43
harmony . PatchAll ( typeof ( ExceptionPatches ) ) ;
43
44
44
- PatchStorage . AddPatchInformation ( typeof ( HarmonyPatchMarshal ) . GetMethod ( "RunMarshal" ) , this . GetType ( ) . Assembly ) ;
45
+ Log . LogInfo ( "Deferring plugin collection.." ) ;
45
46
46
- //Uncomment this to get a demo exception to test with
47
- //ExceptionHandler.DebugThrow();
47
+ var go = new GameObject ( "UDA Patch Collector" , [
48
+ typeof ( UDAPatchCollector )
49
+ ] )
50
+ {
51
+ hideFlags = HideFlags . HideAndDontSave
52
+ } ;
53
+ DontDestroyOnLoad ( go ) ;
48
54
49
55
}
50
56
You can’t perform that action at this time.
0 commit comments