How to update UI (user interface) text game object component via script in 2D Unity game?

Опубликовано: 30 Сентябрь 2024
на канале: Alexander Zotov
7,817
62

#UnityTutorial #SimpleUnityGame #unityupdatetext #unitytextscript
In this video I will show you one of the way how to update or change UI text game object component via C# script.

TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
https://play.google.com/store/apps/de...

Consider purchasing my ULTIMATE UDEMY COURSE with great discount
https://www.udemy.com/how-to-make-gam...

First we create several game objects which are "player" and three "score updater". If player hits one of the updater object then score text value increases or decreases by the certain number. Each updater game object has Circle collider with Is Trigger field checked. Player is going to be moved by arrow keys. Score updater script uses OnTriggerEnter2D method.

www.vecteezy.com - best free vector graphics library ever!