Akshay
Akshay

Reputation: 2763

How to update text on trigger?

So I have created a game, in which an helicopter goes through a ring. So what I wanted to do is that when this helicopter passes through the ring I want the text on GUI to update incrementally 10 times (which is basically a score card).

Could anyone help me with the script.

Thank you.

Upvotes: 0

Views: 129

Answers (1)

Stanislav Osipov
Stanislav Osipov

Reputation: 48

Put game object with trigger collider inside the ring. The add script to this game object with OnTriggerExit method. It will be called when your helicopter will pass through the ring. So you can add score update in same method.

Upvotes: 1

Related Questions