Easy Unity Tutorial: make a button run another script

Опубликовано: 05 Июль 2026
на канале: Red Hen dev
131
1

In this simple tutorial, we code a simple button that will be highlighted a colour when the player gets close enough, and which can activate a function (method) from a different script when the player then presses the left mouse button.

I talk you through the OnTriggerEnter() and OnTriggerExit() functions, and how to make a collider work as a trigger.