Prechádzať zdrojové kódy

update to AA detection

mbunch_kascope 1 rok pred
rodič
commit
c58893e28c

+ 1 - 1
Assets/CardBaseEntity/CardEntity_JSONLoader.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ee1762f0b59534b7856e1e54e9631f99c57f5e0b58cd1deabd572d3b57b6a317
+oid sha256:1ddcfb1aa8a39ebaa8cee50ce3d17123fdf44fb920d79eac29db4c2e8c35c249
 size 477

+ 4 - 5
Assets/Editor/JSONLoader_CardEntity.cs

@@ -138,8 +138,7 @@ namespace DCGO.CardEntities
             cardEntity.CardID = card.id;
             cardEntity.MaxCountInDeck = GetMaxCount(card.restrictions.japanese);
 
-            cardEntity.name = FixCharactersInName($"{cardEntity.CardName_ENG}-{cardEntity.CardSpriteName}"); 
-            cardEntity.CardIndex = GetCardIndex(cardEntity);
+            cardEntity.name = FixCharactersInName($"{cardEntity.CardName_ENG.Replace(" ", "")}-{cardEntity.CardSpriteName}"); 
             Debug.Log($"created: {cardEntity.name}");
 
             SaveScriptableObject(cardEntity);
@@ -176,23 +175,23 @@ namespace DCGO.CardEntities
             {
                 if (updateExisting)
                 {
-                    Debug.Log($"{entity.name} already exists");
                     CEntity_Base asset = (CEntity_Base)AssetDatabase.LoadAssetAtPath(filePath, typeof(CEntity_Base));
 
                     entity.CardIndex = asset.CardIndex;
 
                     EditorUtility.CopySerialized(entity, asset);
                     AssetDatabase.SaveAssets();
+                    Debug.Log($"{entity.name}: Scriptable Object Updated");
                 }
             }
             else
             {
+                entity.CardIndex = GetCardIndex(entity);
                 AssetDatabase.CreateAsset(entity, filePath);
+                Debug.Log($"{entity.name}: Scriptable Object Created");
             }
 
             AssetDatabase.Refresh();
-
-            Debug.Log($"{entity.name}: Scriptable Object Created");
         }
         #endregion