Skip to content

Commit

Permalink
Merge pull request #134 from SansHelvetica/develop
Browse files Browse the repository at this point in the history
fix space issue with cardId
  • Loading branch information
davidmfinol committed Apr 25, 2024
2 parents 01f1996 + f91022c commit db65d0b
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
37 changes: 37 additions & 0 deletions Assets/DefaultNetworkPrefabs.asset

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/DefaultNetworkPrefabs.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Assets/Scripts/Cgs/Cards/SetImportMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using UnityExtensionMethods;

namespace Cgs.Cards
{
Expand Down Expand Up @@ -159,7 +160,8 @@ private IEnumerator ImportSet()
var end = fileName.LastIndexOf(CardGameManager.Current.CardImageFileType,
StringComparison.Ordinal);
var cardName = fileName.Substring(0, end - 1);
var card = new UnityCard(CardGameManager.Current, cardName, cardName, SetName, null, false);
var cardId = UnityFileMethods.GetSafeFileName(cardName).Replace(" ","_");
var card = new UnityCard(CardGameManager.Current, cardId, cardName, SetName, null, false);
FileBrowserHelpers.CopyFile(cardPathsToImport[i].Path, card.ImageFilePath);

if (!File.Exists(card.ImageFilePath))
Expand Down

0 comments on commit db65d0b

Please sign in to comment.