using JetBrains.Annotations; using UnityEngine; using UnityEngine.UI; public class fatherItemPrefab : MonoBehaviour { [Header("objects")] public GameObject father_obj; public GameObject son_obj; [Header("father info")] public Image father_img; public Text father_name; public Text father_description; public Image boarder_img; [Header("son info")] public GameObject son_prefab; public GameObject son_prefab_toPut; public void SetFatherImage(Sprite sprite) { if (father_img == null) return; father_img.sprite = sprite; father_img.enabled = sprite != null; } }