void OnTriggerStay2D(Collider2D other)
{
if(other.gameObject.name == “Player”)
{
if(Input.GetKeyDown(KeyCode.Space))
{
dialougeM.ShowBox(dialogue);
}
}
}
instead of getting the input key and pressing “space” to open the dialogue I want to make a UI button that will open that dialogue box
for example, I have “A” button in my UI and when i tap that button it will open the dialogue box instead of pressing the “space” key