15 lines
328 B
C#
15 lines
328 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class DisableButtonOnpress : MonoBehaviour
|
|
{
|
|
[SerializeField] private Button TargetButton;
|
|
|
|
private void OnEnable()
|
|
{
|
|
TargetButton.onClick.AddListener(()=>TargetButton.interactable = false);
|
|
}
|
|
}
|