From fb6889e3107cf79e75f6931c3aebdb7a4102dd57 Mon Sep 17 00:00:00 2001 From: devbeni Date: Sun, 14 Dec 2025 21:38:38 +0100 Subject: [PATCH] asd --- PrefabManager.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/PrefabManager.cs b/PrefabManager.cs index ad5e1c1..f636173 100644 --- a/PrefabManager.cs +++ b/PrefabManager.cs @@ -20,16 +20,19 @@ namespace KCM public static GameObject modalUIPrefab; - public void PreScriptLoad(KCModHelper _helper) + public static void PreScriptLoad(KCModHelper _helper) { - try + helper = _helper; + if (helper == null) { - //Main.helper = _helper; + helper = Main.instance.helper; + } - assetBundle = KCModHelper.LoadAssetBundle(_helper.modPath, "serverbrowserpkg"); + var assetBundle = helper.LoadAssetBundle(helper.modPath, "serverbrowserpkg"); + + if (assetBundle == null) + { - if (assetBundle == null) - { Main.helper.Log("ERROR: Asset bundle 'serverbrowserpkg' not found! UI features will not work."); Main.helper.Log("Please ensure the asset bundle file is in the mod directory."); return;