Fix manager GameObject not having a name (#735)

This commit is contained in:
ManlyMarco authored and GitHub committed 2023-12-25 00:31:59 +01:00
1 parent f0c0adddff
commit 910844a982
1 file changed
+2 -2
@@ -1,4 +1,4 @@
using System;
using System;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes;
@@ -14,7 +14,7 @@ internal static class Il2CppUtils
public static Il2CppObjectBase AddComponent(Type t)
{
if (managerGo == null)
managerGo = new GameObject { hideFlags = HideFlags.HideAndDontSave };
managerGo = new GameObject { hideFlags = HideFlags.HideAndDontSave, name = "BepInEx_Manager" };
if (!ClassInjector.IsTypeRegisteredInIl2Cpp(t))
ClassInjector.RegisterTypeInIl2Cpp(t);