using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UIElements; public class InfoBox : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler { [SerializeField] private VisualTreeAsset uiAsset; [SerializeField] private PanelSettings uiPanelSettings; public bool AlwaysVisible; private UIDocument uiDocument; private Camera mainCamera; private IInventoryHolder inventoryHolder; private Label infoBox; void Start() { mainCamera = Camera.main; inventoryHolder = GetComponent(); uiDocument = gameObject.AddComponent(); uiDocument.panelSettings = uiPanelSettings; uiDocument.visualTreeAsset = uiAsset; infoBox = uiDocument.rootVisualElement.Q