How To Use Unity UI Button OnClick Function In Your Game | Turn Game Object On And Off Tutorial

preview_player
Показать описание
In this short video I show you how to use UI button OnClick function. You click the button and something happens. In this case I show you a script that allows you to turn any gameobject On And Off Enable and disable it with button click.

You are very welcome :-)

What this video is about and what it can be used for also: unity 2d tutorial, How to disable and enable game object with C# script in Unity game, disable game object unity, enable game object unity, unity script disable game object, unity script enable game object, setactive unity, unity button onclick, enable game object script, disable game object script, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.
Рекомендации по теме
Комментарии
Автор

thanks, just the right length for a quick video on a basic feature and it told me everything I needed to know!

amyblack
Автор

O M G.... You... YOuuuu... You sir... are a life saver!

echoproject
Автор

PLEASE HELP, I M DOING A MAIN MENU FOR MY GAME.
I DO NOT HAVE THE CHECKBOX, SO I CAN NOT MAKE IT TRUE OR FALSE IN ONCLICK() IN THE INSPECTOR
WHAT SHOULD I DO TO MAKE IT THANK YOU IN ADVANCE.

LeHalazoone
Автор

Nice Work I prefer to my friends for watching your tutorial :) and learn something new :)

creativestudio.
Автор

Sir when we click to gameobject old gameobject want off and new gameobject on sir pls reply 😅😅😅🙏🙏🙏🙏🙏😩😩😩😖😖😖

yogeshkhandelwal
Автор

I've created a script similar, but once LoadScene is called, buttons don't work anymore, i can see visual feedback of selecting but the On Click () function doesn't work! But only on Android (the target system), when testing in unity it just work as normal, any ideas?

melissaooficial
Автор

Very good video and extremely easy to implement. Thanks for sharing.

CamperJohn
Автор

How can i turn on a canvas with that script?

Zac_Bacs
Автор

I really want to know how to make this, but the music distracted me. The music can be replace with explanation tho.

haruniki