Skip to content

Commit

Permalink
Fix edit for Game Editor Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmfinol committed May 1, 2024
1 parent 02b070e commit 12920a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Assets/Scripts/Cgs/Menu/CardGameEditorMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -450,6 +451,7 @@ private IEnumerator CreateGame()
? new List<PropertyDef>()
: Of(CardProperty)
};
}

if (!Directory.Exists(unityCardGame.GameDirectoryPath))
Directory.CreateDirectory(unityCardGame.GameDirectoryPath);
Expand Down

0 comments on commit 12920a6

Please sign in to comment.