fix(unity): resolve all 32 C# compilation errors

- CardModel: add missing `id` field
- CardModel: `imageUrl` → `imageUri` (match JSON property name)
- DeckModel: `commanderName` → `commander` (match JSON property name)
- PreconDeck: `imageUrl` → `imageUri`
- Add missing `PreconListWrapper` model class
- Add `using UnityEngine.Networking` to CollectionController,
  DeckGeneratorController, PreconController
- Remove double StartCoroutine() wrapping on ApiClient calls
  (GetRaw/PatchRaw/Delete/PostRaw already return Coroutine)
  Affected: CollectionController, DeckBuilderController,
  DeckGeneratorController, ScannerController, CoachController
This commit is contained in:
KoalaTrapLord committed 2026-03-19 05:13:00 +00:00
1 parent 2d8a55fdc6
commit a501a9755d
9 files changed
+47 -30

No files matched your search

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using TMPro;
@@ -114,9 +115,9 @@ namespace CommanderAILab.UI
string q = commanderSearchInput.text.Trim();
if (string.IsNullOrEmpty(q)) return;
string path = $"/api/collection?search={UnityWebRequest.EscapeURL(q)}&type=Legendary+Creature&per_page=20";
StartCoroutine(ApiClient.Instance.GetRaw(path,
ApiClient.Instance.GetRaw(path,
json => PopulateCommanderResults(json),
err => ShowError($"Commander search failed:\n{err}")));
err => ShowError($"Commander search failed:\n{err}"));
}
private void PopulateCommanderResults(string json)