// NOTE: Windows-only. Depends on WebViewLauncher (external Flutter .exe launcher), // which is Windows-only. Wrapped in UNITY_STANDALONE_WIN so the Windows // build/logic is unchanged while Android compiles this class out. #if UNITY_STANDALONE_WIN using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; using System; using System.IO; public class game_card_Prefab : MonoBehaviour, IPointerClickHandler { [Header("Inspector")] public Image card_icon_image; public Text card_name_text; public Text authorName_text; public Text versionCode_text; public Text description_text; public Text _isOfficial_text; public Text source_text; public Text yyyy_mm_dd; [Header("Optional clickable Button (auto-find if null)")] public Button clickButton; // Documentation text normalized. private string indexFilePath; public void SetData(string indexPath, string cardName, string authorName, string description, string isOfficial, string source, string yyyyMmDd, string version) { indexFilePath = indexPath; if (card_name_text != null) card_name_text.text = cardName ?? ""; if (authorName_text != null) authorName_text.text = authorName ?? ""; if (description_text != null) description_text.text = description ?? ""; if (_isOfficial_text != null) _isOfficial_text.text = isOfficial ?? ""; if (source_text != null) source_text.text = source ?? ""; if (yyyy_mm_dd != null) yyyy_mm_dd.text = yyyyMmDd ?? ""; // version string ver = string.IsNullOrEmpty(version) ? "0.0.0" : version; if (versionCode_text != null) versionCode_text.text = ver; UnityEngine.Debug.Log($"game_card_Prefab.SetData: indexPath='{indexFilePath}', card_name='{cardName}', author='{authorName}', isOfficial='{isOfficial}', source='{source}', version='{ver}'"); } void Awake() { // If no explicit Button assigned, try to find one on this GameObject or children if (clickButton == null) { clickButton = GetComponent