16 lines
388 B
C#
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);
|
|
}
|
|
}
|