From ef587344ace8a93424d5fb10b633213d8b97b63c Mon Sep 17 00:00:00 2001 From: DaXcess Date: Wed, 12 Jun 2024 09:19:54 +0200 Subject: [PATCH] Add check for deserialization failure --- Source/Assets/AssetManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Assets/AssetManager.cs b/Source/Assets/AssetManager.cs index 931ab99f..b98ceef2 100644 --- a/Source/Assets/AssetManager.cs +++ b/Source/Assets/AssetManager.cs @@ -78,6 +78,12 @@ public static bool LoadAssets() doorLocked = assetBundle.LoadAsset("doorlocked"); + if (RemappableControls == null || RemappableControls.controls == null) + { + Logger.LogError("Unity failed to deserialize some assets. Are you missing the FixPluginTypesSerialization mod?"); + return false; + } + return true; }