This commit is contained in:
2025-12-14 21:38:38 +01:00
parent 0a2c44832f
commit fb6889e310

View File

@@ -20,16 +20,19 @@ namespace KCM
public static GameObject modalUIPrefab; 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("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."); Main.helper.Log("Please ensure the asset bundle file is in the mod directory.");
return; return;