diff --git a/Assets/Scripts/UI/GamePanel.cs b/Assets/Scripts/UI/GamePanel.cs index c925182..10f4fb4 100644 --- a/Assets/Scripts/UI/GamePanel.cs +++ b/Assets/Scripts/UI/GamePanel.cs @@ -42,7 +42,7 @@ public class GamePanel : MonoBehaviour private void OnSwitchComponent(ComponentConfig componentConfig, int componentIndex) { Debug.Log("OnSwitchComponent"); - if (spawnedTypewriters == null || this.componentConfigName == null) + if (spawnedTypewriters == null || this.componentConfigName == null || componentConfig.组件描述.IsNullOrEmpty()) return; if (!spawnedTypewriters.TryGetValue(this.componentConfigName, out var typewriter)) {