using UnityEngine; using System.Collections.Generic; using System.Text; using TMPro; public class InvoiceShow : MonoBehaviour { [SerializeField] private TMP_Text clientName; [SerializeField] private TMP_Text clientEmail; [SerializeField] private TMP_Text shapesList; [SerializeField] private TMP_Text total; void OnEnable() { Show(); } public void Show() { if (clientName != null) clientName.text = _G.CLIENT_NAME; if (clientEmail != null) clientEmail.text = _G.CLIENT_EMAIL; if (total != null) total.text = _G.PriceTotal; if (shapesList == null) return; StringBuilder lines = new(); foreach (KeyValuePair selection in _G.SHAPE_SELECTIONS) { lines.AppendLine(selection.Key); } shapesList.text = lines.ToString(); } }