From ab119e02be5de14269a612abd59ac678acb1ff8d Mon Sep 17 00:00:00 2001 From: minenice55 Date: Thu, 8 Sep 2022 16:29:56 -0400 Subject: [PATCH] tengoku -> riq converter: skip unknown datamodels --- Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs b/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs index dd4b557b..6de35a42 100644 --- a/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs +++ b/Assets/Scripts/BeatmapFormats/DynamicBeatmap.cs @@ -235,6 +235,12 @@ namespace HeavenStudio game = EventCaller.instance.GetMinigame(e.datamodel.Split(0)); action = EventCaller.instance.GetGameAction(game, e.datamodel.Split(1)); + if (game == null || action == null) + { + //FUTURE: attempt to convert to a new entity if a converter exists for this datamodel + UnityEngine.Debug.LogError($"Could not find game or gameaction from datamodel {e.datamodel} @ beat {e.beat}, skipping entity"); + continue; + } // Debug.Log($"{game.name} {action.displayName} @ beat {e.beat}"); Dictionary dynamicData = new Dictionary();