Unity Tutorial: Open Panel on Button Click

  Рет қаралды 170,142

Jayanam

Jayanam

Күн бұрын

This is an answer to a request for Unity game development, on how to open a UI Panel when a Button is clicked.
I show this example and also how to toggle the visibility of the Panel.
See my social profiles here
G+: plus.google.com/+JayAnAm
Twitter: / jayanamgames
Facebook: / jayanamgames
Patreon: / jayanam
Indiegogo: / jayanamgames
Production Music courtesy of Epidemic Sound: www.epidemicsound.com

Пікірлер: 198
@AobaSanJin
@AobaSanJin 4 жыл бұрын
Some people trying to help but they made my mind more complicated. But you are amazing with brief and perfect telling, thank you so much.
@JayAnAm
@JayAnAm 4 жыл бұрын
Thx, great it helps!
@markzckrbrengsek87
@markzckrbrengsek87 2 жыл бұрын
ok now how to close it XD
@TurboMotorsportsRoblox
@TurboMotorsportsRoblox Жыл бұрын
@@markzckrbrengsek87 he just did it at the end...
@husseinal-faiz1533
@husseinal-faiz1533 3 жыл бұрын
I have been searching through various KZfaq tutorials regarding this problem and finally I found this video .Simple and concise. Thank you Guru!!!!
@JayAnAm
@JayAnAm 3 жыл бұрын
Thx, glad it helped
@imdublin4431
@imdublin4431 3 жыл бұрын
i love you bro! i've been watching a couple videos and none of em work, but yours does !
@JayAnAm
@JayAnAm 3 жыл бұрын
Glad I could help
@kevinburgess1019
@kevinburgess1019 4 жыл бұрын
Super helpful with an excellent teaching style. SUBSCRIBED!! Please make many more!
@JayAnAm
@JayAnAm 4 жыл бұрын
Thx m8, will do
@JacobLofgreen
@JacobLofgreen 3 жыл бұрын
THANK YOU!!! Simple, easy, exactly what I needed.
@hemanthc1166
@hemanthc1166 3 жыл бұрын
Waah sir, i have been searching for this simce 2 dayss, Finally i found it❤️❤️
@KontrollerrLOL
@KontrollerrLOL 4 жыл бұрын
for anyone who use that for a pause menu and want freeze time u have to add under Panel.SetActive(true); Time.timeScale = 0f;
@JayAnAm
@JayAnAm 4 жыл бұрын
Alright, thx for pointing this out.
@KontrollerrLOL
@KontrollerrLOL 4 жыл бұрын
@@JayAnAm np
@samarthrao3793
@samarthrao3793 4 жыл бұрын
thank you for the brief helpful tutorial, just what I needed
@Manuel_S
@Manuel_S 4 жыл бұрын
Thank you for this men, so simple and well explained
@imvincible1391
@imvincible1391 3 жыл бұрын
Great Tutorial! Super simple and useful!
@Bonsaiwurzel
@Bonsaiwurzel 3 жыл бұрын
Thanks, simple and easy! As a beginner this helped me a lot :)
@lyth4082
@lyth4082 4 жыл бұрын
Thank you! Saved me multiple minutes/hours!
@holgerchristensen4021
@holgerchristensen4021 5 жыл бұрын
Quick and simple. Thanks man!
@allancabilestoc6235
@allancabilestoc6235 2 жыл бұрын
thank you.. this tutorial is easy to follow and very helpful
@zandmunimdesignanddevelopm8061
@zandmunimdesignanddevelopm8061 4 жыл бұрын
So simple for toggling panels my code was all working but this is nice and clean switched all them now lol
@hafeezurramlee3276
@hafeezurramlee3276 3 жыл бұрын
Amazing work!
@ernesto_schz
@ernesto_schz 4 жыл бұрын
your tutorial helped me a lot thnks man
@damdakos
@damdakos 5 жыл бұрын
Many thanks. I like that it is very simple. Very good
@rickmasterKKK
@rickmasterKKK 3 жыл бұрын
Very nice, thank you for this tutorial
@jackal963
@jackal963 Жыл бұрын
Awesome man, very clever !
@jaydeepbhoite5829
@jaydeepbhoite5829 4 жыл бұрын
Hey there great video. I'm trying to make two buttons to display two different tiles , facing some issues with the code so needed help. Thanks !
@pollyanewertonewerton1499
@pollyanewertonewerton1499 4 жыл бұрын
Thanks. Helped me a lot.
@wanainnabila2311
@wanainnabila2311 3 жыл бұрын
thank you so much for the great tutorial
@timotimepiipponen3274
@timotimepiipponen3274 3 жыл бұрын
Clear and useful, thank you!
@JayAnAm
@JayAnAm 3 жыл бұрын
Glad it was helpful!
@EVHlivesforever
@EVHlivesforever 5 жыл бұрын
Thanks so much for the tutorial this saved my skin!!
@PositronicDiscombobulator
@PositronicDiscombobulator 3 жыл бұрын
Thank you so so much....many blessings to you.
@AbieAqbarrizqy06
@AbieAqbarrizqy06 3 жыл бұрын
Thanks !! Amazing video :)
@ImInDaSkies
@ImInDaSkies 5 жыл бұрын
Great tutorial
@caron10130
@caron10130 5 жыл бұрын
Thanks this helped a lot!
@rinaldifarhan3717
@rinaldifarhan3717 5 жыл бұрын
Thank youuuu so much for the tutorial
@Dorbellprod
@Dorbellprod 4 жыл бұрын
Thank you so much for teaching me SetActive, epic
@denysuhendraproject5251
@denysuhendraproject5251 3 жыл бұрын
Thank you for the knowledge !
@JayAnAm
@JayAnAm 3 жыл бұрын
My pleasure!
@misal-isahabe5281
@misal-isahabe5281 3 жыл бұрын
was so beneficial. thanks.
@kevdoesart8996
@kevdoesart8996 5 жыл бұрын
Perfect. Thank you.
@StyshaLatip
@StyshaLatip 5 жыл бұрын
Awesome! Thank you
@bmwlux8706
@bmwlux8706 2 жыл бұрын
Everyone tries to make their video longer with like 1000 annoying steps but your a pro, unlike them.
@mediamermaid333
@mediamermaid333 Ай бұрын
Thank you!!
@kareem5340
@kareem5340 2 жыл бұрын
Thank you so much
@thilosapp5300
@thilosapp5300 3 жыл бұрын
Thank you! Soo helpful!
@cyberkonco
@cyberkonco 2 жыл бұрын
thank you so much sir...
@freeju2001
@freeju2001 4 жыл бұрын
this one fixed my issue like "BAM"!!!
@JayAnAm
@JayAnAm 4 жыл бұрын
BAM... that's great!
@sitinurfatihah1928
@sitinurfatihah1928 4 жыл бұрын
thankssss it works!
@vijayanand2783
@vijayanand2783 3 жыл бұрын
Nice video.Keep uploading videos..
@JayAnAm
@JayAnAm 3 жыл бұрын
Thank you, I will
@skyeparker5822
@skyeparker5822 2 жыл бұрын
The way all tutorials should be
@nurzaniliyanaabdulrani9798
@nurzaniliyanaabdulrani9798 3 жыл бұрын
great tutorial! just want to ask, is that possible to add video onto this panel? cause i'm facing some problem with the video player panel on a canvas. thank you.
@LegendeSiMituri
@LegendeSiMituri 3 жыл бұрын
2021 still teaching people
@mrdonnki119
@mrdonnki119 3 жыл бұрын
using this for fnaf fangame. thank you:)
@julio1192
@julio1192 2 жыл бұрын
Thank you!
@dmmarch7185
@dmmarch7185 2 жыл бұрын
OMG thank you!!
@moonhope3638
@moonhope3638 5 жыл бұрын
Nice! Thanks, this was straightforward and useful. :) Any chance you can talk about having it disappear upon answering a question right. I added true and false buttons that appear alongside the panel on button press. But, I want it to stay upon getting the question wrong and disappear upon getting the question right. Any tips would be much appreciated.
@TechnoPhiliaa
@TechnoPhiliaa 4 жыл бұрын
can you please help me . i just imported the obj to unity . Now what is want is that ..thr is a picture on a wall and i want a button next to it and on click it should display a popup with some text.
@mulagraphics
@mulagraphics 2 жыл бұрын
Thanks from the future😀😀
@gaelpic1120
@gaelpic1120 5 жыл бұрын
thank you so much
@chungcu681
@chungcu681 5 жыл бұрын
Thank you
@rocknrm99
@rocknrm99 Жыл бұрын
thanks!
@murdermystery9740
@murdermystery9740 6 ай бұрын
thank you!! :]]
@grafidystudios6582
@grafidystudios6582 2 жыл бұрын
thankyouuuuu!
@venmen5282
@venmen5282 Жыл бұрын
Thank you!!!!!!!!!!!
@gubaSVK
@gubaSVK 5 жыл бұрын
Maga usefull tutorial. Thank you!!!
@asonlove2350
@asonlove2350 2 жыл бұрын
Thank you!!!!
@zaennur3291
@zaennur3291 5 жыл бұрын
thank for tutorial.
@JayAnAm
@JayAnAm 5 жыл бұрын
You are very welcome!
@awesomefacts9785
@awesomefacts9785 4 жыл бұрын
hi sir...............short and nice video, i have a doubt that i was planning to develop a 4 option quiz game in unity, i want to display the questions facts and uses in the other panel when the user presses the right or wrong answer, for this do i have to make different panels for each question...
@cristianlcortes
@cristianlcortes 15 күн бұрын
i love it
@timaging
@timaging 2 жыл бұрын
how do you set up multiple buttons to show and hide multiple panels? Can you add animation to those panels?
@shaansingh7629
@shaansingh7629 3 жыл бұрын
Hey mate I'm wondering if a panel is open how can I stop another panel from appearing? Also really great tutorial!
@fga55
@fga55 5 жыл бұрын
Can I do the same steps if I’m using vuforia and the button only opens when an image target gets detected?
@robinandersson399
@robinandersson399 3 жыл бұрын
I really love your tutorials; they're short, concise and easy to follow. However, in this example I would love to understand the code a bit more. Not being so familiar with coding, this certainly played some tricks on my mind. Can you or anyone else please confirm if I have gotten this right?: (Panel != null) // Checks if the object is activated in the hierarchy windows Bool = isActive = Panel.activeSelf; //Creates a bool that reflects the false/true status of the Panel-object Panel.SetActive(!isActive); -// Sets the Bool to the opposite of what the bool "isActive" is?
@lora6938
@lora6938 2 жыл бұрын
Hello, can you tell me how to smoothly disable and enable buttons or panels, well, in general, UI elements?
@Muhammed-hd6gv
@Muhammed-hd6gv 4 жыл бұрын
Thanks
@MrISIDOROS
@MrISIDOROS 5 жыл бұрын
This is amazing.... Quite exactly what i needed. Question, coz i m newb in unity, would it be possible to add animation in the "toggle" button (ex. opening slowing from the center of the screen)? I going to work towards this :D. How do i go about making a custom animation.
@ratboyOwO
@ratboyOwO 4 жыл бұрын
look up simple UI animation. Unity has a keyframe tool similar to a video editor or flash animator if youve ever used something like that.
@XavierDetcheverry001
@XavierDetcheverry001 Жыл бұрын
Thank's !!!!
@NabilMajid
@NabilMajid 5 жыл бұрын
I need in one app, one button, when i press this button, it enable another button in another app. Example both app are open in 2 diferent cellphone. Then when i press the button in the fisrt app, in the other app appear one button, then when i press that button. the button from my app disapear. How can i do that, is possible?
@HellBound_101
@HellBound_101 3 жыл бұрын
Thank's 😊
@jiehangruan4454
@jiehangruan4454 4 жыл бұрын
thanks!!!
@dertobbe1176
@dertobbe1176 10 ай бұрын
Well that looks easy
@ephemerlab
@ephemerlab 4 жыл бұрын
Thank you :) Is there a way to make the panel fade in rather than just suddenly appearing? Would this have to be done through animation or tween or is there an easier way?
@AlexGorskov
@AlexGorskov 2 жыл бұрын
someone please reply to this one :)
@exet208
@exet208 3 жыл бұрын
it can be used to any other things like button of category of gameobject?
@ankitsharma-se2vv
@ankitsharma-se2vv 2 жыл бұрын
this tutorial helped me in unity game development. Now i am trying to open a panel automatically when a prefab is spawned in runtime, any idea how to do it.
@gauravverma1672
@gauravverma1672 3 жыл бұрын
thank u sir ..
@JayAnAm
@JayAnAm 3 жыл бұрын
Thx and all the best
@aiilascosse
@aiilascosse 5 жыл бұрын
How I do this in object, for exemple a cube instead of a button?
@hemanthteja9996
@hemanthteja9996 4 жыл бұрын
Hi sir, I have created two buttons and added panel to it When i press button 1 it open panel and when i click second button it's still showing 1st button panel on How to hide previous panel automatically when we are in 2nd button panel
@ParpleYt
@ParpleYt 3 ай бұрын
This was amazing, but i have on question how do I close the panel?
@IcelandicCello
@IcelandicCello Жыл бұрын
The video is so clear. However, when I try even the first step, I seem to be able to click the button, but then the panel does not appear. I have Event Systems in my hierarchy, my canvas has a graphic ray caster, and I do exactly what is explained here. I'm a bit desperate at this point, would anyone have advice?
@wanhui6826
@wanhui6826 3 жыл бұрын
May I know why my panel will initially shown before button on click ?
@shivamhire9869
@shivamhire9869 5 жыл бұрын
can i use the same implementation for a VR game ??
@zero33z
@zero33z 5 жыл бұрын
and how can i close this panel?
@raymondyudhi6963
@raymondyudhi6963 5 жыл бұрын
Thank you for this tutorial. Would you tell me how about toggle more panels? I mean, click button > open first panel > click panel > open second panel > click panel > open third panel > click panel > close all panels
@Jana-vf2gq
@Jana-vf2gq 4 жыл бұрын
Did you get any answers how to do that ? Or did you find any other Videos that explain that ? It would help me a lot :)
@raymondyudhi6963
@raymondyudhi6963 4 жыл бұрын
@@Jana-vf2gq still not yet
@eddybplayz4801
@eddybplayz4801 3 жыл бұрын
@@raymondyudhi6963 hi
@embaunton6555
@embaunton6555 2 жыл бұрын
Any update? This is exactly what I'm looking for also
@franciscofimbres3328
@franciscofimbres3328 4 жыл бұрын
how do I stop overlapping can you please explain in depth thanks for the trouble.
@micheleguardabasso8162
@micheleguardabasso8162 11 ай бұрын
Can you please tell me as i can oper and close with key press? Keyboard
@achikarif1098
@achikarif1098 2 жыл бұрын
why when I do drag the scripts into button inspector the panel for game object doesn't appear .. I'm currently using unity 2021.1.21f1 .. I can't figure this problem out can somebody help me??
@Haxor1021
@Haxor1021 4 жыл бұрын
Ok, How to do it to the Button(Clone)? I need to do it but Setactive is not working
@MAKSOS_91
@MAKSOS_91 2 жыл бұрын
!Thanks
@deathseeker9525
@deathseeker9525 5 жыл бұрын
is it possible to show one panel while the other is hide when clicking a button?help..
@saufamahardika3557
@saufamahardika3557 4 жыл бұрын
good
@plasmarade
@plasmarade 4 жыл бұрын
Would this work with keyboard keys? (Example: press E to open the panel)
@scrypt5309
@scrypt5309 3 жыл бұрын
yes use input get key
@remconet
@remconet 3 жыл бұрын
Okay I've tried this but it's not working... Can't figure out what I'm doing wrong. Update: it IS working but it was not very clear as to WHERE to uncheck the panel. I unchecked the wrong one. Fixed it now and it's working.
@umiumairah2733
@umiumairah2733 4 жыл бұрын
Hi, may i know if i want to close the panel but i want to click on different button for example x button, is there need to have new coding? Please notice this comment shortly! Thanks!!!
@embaunton6555
@embaunton6555 3 жыл бұрын
Hi! currently doing this. Did you manage to do it?
@pinkviagra4831
@pinkviagra4831 3 жыл бұрын
the Panel default wouldnt appear in the Inspector wouldnt appear underneath the Button script;(
@KaLeeLIU-zd8eh
@KaLeeLIU-zd8eh Жыл бұрын
Hi I wanna ask how can I change the button to click on E
@koshinnn
@koshinnn Жыл бұрын
does it work for canvas as well?
Unity 3D Game Kit Tutorial : Checkpoints to respawn player
3:18
PAUSE MENU in Unity
12:13
Brackeys
Рет қаралды 979 М.
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 64 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 93 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 12 МЛН
Unity Button Tutorial
8:21
AIA
Рет қаралды 38 М.
Unity UI Tutorial: Set Text On Button Click C# Event
4:18
Jayanam
Рет қаралды 44 М.
Making a VIRUS for a Game Jam (and almost winning)
9:36
Deynum Studio
Рет қаралды 281 М.
The right way to pause a game in Unity
9:09
Game Dev Beginner
Рет қаралды 56 М.
Simulating the Evolution of a Zombie Pandemic (Virus simulation)
18:38
Why you should use code to animate your UI in Unity.
5:02
Game Dev Guide
Рет қаралды 327 М.
START MENU in Unity
12:52
Brackeys
Рет қаралды 3 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 64 МЛН