using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class UnitPlacementButton : MonoBehaviour, IPointerDownHandler { [SerializeField, Tooltip("the gameobject we will drag")] private GameObject placeholder; public void OnPointerDown(PointerEventData eventData) { Instantiate(placeholder); } }