using System; using System.Collections; using System.Collections.Generic; using TMPro; using Unity.Collections.LowLevel.Unsafe; using UnityEngine; using UnityEngine.UI; using UnityEngine.U2D; /// /// Grid version of view container, which does feature an info panel! /// public class ViewItemContainerGrid : ViewItemContainer { public override bool IsSelected { get => highLight.gameObject.activeSelf; set { infoPanel.gameObject.SetActive(value); highLight.SetActive(value);} } //Link to the infomation panel (set in prefab), prototype pattern [SerializeField] private ViewItemInfoPanel infoPanel; protected override void OnInitialize(Item item) { infoPanel.SetItemInfo(item); // Grid info comes with a panel, so we set its info just once } }