gather-and-defend/Assets/Scripts/UnitPlacementButton.cs
2023-06-03 09:35:13 -04:00

16 lines
388 B
C#

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);
}
}