From 12920a61cfa4e6104ef6070b8499defc6ee22157 Mon Sep 17 00:00:00 2001 From: David Finol Date: Wed, 1 May 2024 18:05:59 -0500 Subject: [PATCH] Fix edit for Game Editor Menu --- Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs b/Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs index 5c5333cf..b4d11bd3 100644 --- a/Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs +++ b/Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs @@ -431,9 +431,10 @@ private IEnumerator CreateGame() yield break; } - var unityCardGame = _isEdit - ? _game - : new UnityCardGame(CardGameManager.Instance, gameName) + var unityCardGame = _game; + if (!_isEdit) + { + unityCardGame = new UnityCardGame(CardGameManager.Instance, gameName) { AutoUpdate = -1, CardSize = new Float2(_width, _height), BannerImageFileType = BannerImageFileType == 0 ? "png" : "jpg", @@ -450,6 +451,7 @@ private IEnumerator CreateGame() ? new List() : Of(CardProperty) }; + } if (!Directory.Exists(unityCardGame.GameDirectoryPath)) Directory.CreateDirectory(unityCardGame.GameDirectoryPath);