using UnityEngine; using UnityEngine.UIElements; public class TestTownShopUI : MonoBehaviour { public void TestShopUI() { Debug.Log("Creating test shop UI..."); var shopUIObject = new GameObject("TestTownShopUI"); var uiDocument = shopUIObject.AddComponent(); // Load the UXML uiDocument.visualTreeAsset = Resources.Load("UI/TownShopUI"); if (uiDocument.visualTreeAsset == null) { Debug.LogError("Failed to load UXML!"); return; } Debug.Log("UXML loaded successfully"); // Get the root and shop container var root = uiDocument.rootVisualElement; var shopContainer = root?.Q("shop-container"); Debug.Log($"Root: {root != null}, ShopContainer: {shopContainer != null}"); if (shopContainer != null) { shopContainer.style.display = DisplayStyle.Flex; Debug.Log("Shop container made visible"); // Test setting some content var shopName = root.Q