From 910844a982dbb126d0c6544847424bc42fb7849c Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Mon, 25 Dec 2023 00:31:59 +0100 Subject: [PATCH] Fix manager GameObject not having a name (#735) --- Runtimes/Unity/BepInEx.Unity.IL2CPP/Utils/Il2CppUtils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtimes/Unity/BepInEx.Unity.IL2CPP/Utils/Il2CppUtils.cs b/Runtimes/Unity/BepInEx.Unity.IL2CPP/Utils/Il2CppUtils.cs index 419fae6..d46ee73 100644 --- a/Runtimes/Unity/BepInEx.Unity.IL2CPP/Utils/Il2CppUtils.cs +++ b/Runtimes/Unity/BepInEx.Unity.IL2CPP/Utils/Il2CppUtils.cs @@ -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);