Unity UI Tutorial: Set Text On Button Click C# Event

  Рет қаралды 44,378

Jayanam

Jayanam

Күн бұрын

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: / jayanamgames
Twitter: / jayanamgames
Facebook: / jayanamgames
Patreon: / jayanam
Merch Store: teespring.com/de/stores/jayan...
Production Music courtesy of Epidemic Sound: www.epidemicsound.com

Пікірлер: 28
@nerokuma
@nerokuma Жыл бұрын
Thank you so much, thats exactly what i needed.
@barkhaseth4259
@barkhaseth4259 4 жыл бұрын
How do I make the text change back to what it was earlier after clicking on the button a second time?
@pauldurand7801
@pauldurand7801 2 жыл бұрын
Hello, how can I set the text from a list of quotes randomly to show instead of Mt text ?
@realamp07
@realamp07 3 жыл бұрын
Why mine doesn't change in the game scene but the contents of the text change when I view in the inspector.
@kingclassic2231
@kingclassic2231 2 жыл бұрын
Is there a way to do that with inputField?
@KaLeeLIU-zd8eh
@KaLeeLIU-zd8eh Жыл бұрын
Hi your vid is very useful but can you make a tutorial on how to change what to click to show the message? I want it to be after interacting with an object by pressing "E", then it shows a message. How can I do that? Thanks!!!
@soma78
@soma78 2 жыл бұрын
lol that Diablo backgroung music tho...
@Franky4370
@Franky4370 3 жыл бұрын
thxxxx
@akhilmishra3258
@akhilmishra3258 Ай бұрын
Bro I need help, actually there is one issue I am facing with the appearance of text in unity, its like a notification text which I have created and just want it to appear when it should and it does appear in the text input box after hitting play but we have to manually disable and enable it then only it shows on UI and then once you exit it goes back ! can't understand what's the issue !
@lagilagimolaglag
@lagilagimolaglag 3 жыл бұрын
i need that on text mesh pro
@HughMongousPC
@HughMongousPC 11 ай бұрын
That doesn't show up for me while typing, not sure how we're supposed to follow along without that
@parrymegundyr
@parrymegundyr 2 жыл бұрын
Trying to make a conversation, how can I get it to prompt more text after this?
@HughMongousPC
@HughMongousPC 11 ай бұрын
exactly, this is a guide missing crucial steps
@doksansekizli
@doksansekizli 3 жыл бұрын
thanks
@JayAnAm
@JayAnAm 3 жыл бұрын
You're welcome!
@smilingflame3152
@smilingflame3152 Жыл бұрын
i love you
@tenminutetokyo2643
@tenminutetokyo2643 4 жыл бұрын
DOOD!
@johnjoseph7402
@johnjoseph7402 2 жыл бұрын
This video is a weapon of mass destruction. Your use of the word "text" to name different elements or properties is brain-breaking and confusing - it prevents the lesson from landing. Very confusing.
@One-iu2gt
@One-iu2gt 4 жыл бұрын
I am first
@JayAnAm
@JayAnAm 4 жыл бұрын
Great m8
@JermaineMorgan
@JermaineMorgan 4 жыл бұрын
Yes.. that is cute hon
@sbbillusionist
@sbbillusionist 2 жыл бұрын
@@JermaineMorgan yes dad
@JermaineMorgan
@JermaineMorgan 2 жыл бұрын
@@sbbillusionist A year and half later son.
@sbbillusionist
@sbbillusionist 2 жыл бұрын
@@JermaineMorgan Maybe that's what the fate wanted🤔
Unity UI Tutorial Dropdown C# Scripting
4:34
Jayanam
Рет қаралды 69 М.
Unity Tutorial: Open Panel on Button Click
3:39
Jayanam
Рет қаралды 170 М.
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 54 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 53 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 14 МЛН
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 52 МЛН
Making UI for Games with UI Toolkit ~ Unity 2022 Beginner's Guide to UI
13:55
How to easily display text in unity by a trigger! c#
10:09
Notes From A Nomad
Рет қаралды 31 М.
Master Unity Button OnClick actions! - Unity UI tutorial
11:36
Events & Delegates in Unity
13:20
Game Dev Beginner
Рет қаралды 50 М.
What are Events? (C# Basics)
15:05
Code Monkey
Рет қаралды 379 М.
Drag and drop in Unity UI - create your own inventory UI!
12:47
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 54 МЛН