Unity Set Text On Button Click Event in C# Script
I had a request to create a Unity tutorial on how to set a text for a UI Text field when a button is clicked. I show in this show video how to create this simple UI in a Unity scene and then I implement the C# script for the button to set the text for a text field.
The text field can be dragged to a public variable of type UnityEngine.UI.Text and I bind the On clicked event of the button to a public method that I implemented called SetText of the script.
See my social profiles here:
Instagram: https://www.instagram.com/jayanamgames/
Twitter: https://twitter.com/jayanamgames
Facebook: https://www.facebook.com/jayanamgames
Patreon: https://www.patreon.com/jayanam
Merch Store: https://teespring.com/de/stores/jayanam-gamedev
Production Music courtesy of Epidemic Sound: http://www.epidemicsound.com