using System.Collections.Generic; using Unity.VisualScripting; using UnityEngine; public class Player : MonoBehaviour { [Header("Units")] public List units = new List(); // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { } // Update is called once per frame void Update() { } //is this my unit? public bool IsMyUnit(Unit unit) { return units.Contains(unit); } }