mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
add fatal error messages for missing files
This commit is contained in:
parent
13537f0ec0
commit
7a704edfeb
@ -127,6 +127,12 @@ public class QSBCore : ModBehaviour
|
||||
ConversationAssetBundle = Helper.Assets.LoadBundle("AssetBundles/qsb_conversation");
|
||||
DebugAssetBundle = Helper.Assets.LoadBundle("AssetBundles/qsb_debug");
|
||||
|
||||
if (NetworkAssetBundle == null || ConversationAssetBundle == null || DebugAssetBundle == null)
|
||||
{
|
||||
DebugLog.ToConsole($"FATAL - An assetbundle is missing! Re-install mod or contact devs.", MessageType.Fatal);
|
||||
return;
|
||||
}
|
||||
|
||||
QSBPatchManager.Init();
|
||||
DeterministicManager.Init();
|
||||
QSBLocalization.Init();
|
||||
|
@ -186,6 +186,13 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
|
||||
private static GameObject MakeNewNetworkObject(int assetId, string name, Type networkBehaviourType)
|
||||
{
|
||||
var bundle = QSBCore.Helper.Assets.LoadBundle("AssetBundles/qsb_empty");
|
||||
|
||||
if (bundle == null)
|
||||
{
|
||||
DebugLog.ToConsole($"FATAL - An assetbundle is missing! Re-install mod or contact devs.", MessageType.Fatal);
|
||||
return null;
|
||||
}
|
||||
|
||||
var template = bundle.LoadAsset<GameObject>("Assets/Prefabs/Empty.prefab");
|
||||
bundle.Unload(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user