UI Basics in Unity with Playmaker (UI System Events)

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 103

  • @adamstestanimations
    @adamstestanimations 3 роки тому +11

    Love your tutorials! Best teacher ever! Love the mad intermissions. Very refreshing! More please!

  • @TheJoktan
    @TheJoktan 2 роки тому +1

    Well done. That slider commercial was ingenious! Lol

  • @nickromanek9444
    @nickromanek9444 3 роки тому +3

    These are the best game dev videos I've seen yet

  • @karlschanzl
    @karlschanzl Рік тому

    many UA-camrs from instructional videos can learn a lot
    no music in the background that makes the text unintelligible.
    perfect TimeCodes.
    short and on point.

  • @junoxii6181
    @junoxii6181 3 роки тому +11

    I want this guy to be my teacher in school so I not will sleepy anymore

    • @Malicos
      @Malicos 3 роки тому

      so I not will sleepy anymore, indeed.

  • @bowsicraft3
    @bowsicraft3 3 роки тому +2

    You need more subscribers! Thank you for the info and personality!

  • @SirDMX
    @SirDMX 4 роки тому +2

    I was making my UI more complicated that it needed to be, awesome tutorial!

  • @jessikapiche6097
    @jessikapiche6097 2 роки тому

    you know...dark humor is exactly what i need right now... ;) You made my day! ;)

  • @striverfor7628
    @striverfor7628 Рік тому +2

    Notes for myself
    Create a canvas
    Right click on Canvas > IU > Button
    Add FSM to Button
    Add UI Text Set Text to State 1. Specify Game Object as the button text. Write the button text.
    Press Play, it works.
    Name State 1. Create new state named Clicked
    2:18 Right click on Clicked state > Add Global Transition > System Events > UI CLICK. Press Play. It works when you click on the button. Copy-paste Start action state into Clicked, write text as ‘Clicked’. Press Play, text changes to ‘Clicked’.
    3:06 Create a toggle. Right click Canvas > UI > Toggle. Add FSM to it
    4:05 Create 3 new states. Bool check, Checked, Unchecked. Right click Bool check > Add Global Transition > UI Events > UI BOOL VALUE CHANGED.
    Add ‘Get Event Bool Data’ action to Bool check. > New Variable - name it ToggleChecked.
    Add Bool Test action to Bool check. Bool Variable > toggleChecked.
    Is True > New Event, name it ‘true’.
    Is False > New Event, name it ‘false’.
    Lead true to Checked and false to Unchecked.
    5:53 Add UI Text Set Text action to Checked, Specify Game Object as Label from Toggle game object. Text > write ‘True’. Copy-paste UI Text Set Text to Unchecked state and have that say ‘False’. Press Play, it works.
    6:47 Copy and paste UI Text Set Text values to State 1. To make Start state false, type False, and uncheck ‘Is On’ in Toggle's component.
    7:47 Right click on Canvas > UI > Slider
    Add FSM to Slider. Add 2nd state. Right click on Slider state > Add Global Transition > UI Events > UI FLOAT VALUE CHANGED.
    Add Get Event Float Data action. Store the data in a New Variable.
    Right click on Slider game object > UI > Text
    Select Update Slider FSM, add Convert Float To String and UI Text Set Text
    Set Float Variable to sliderFloat
    For string variable create a new variable, call it floatDisplay
    Set Format to 0.00. Set it to every frame.
    Specify UI Text Set Text game object as SliderValue game object.
    Use floatDisplay variable for text.
    Set to every frame.
    Now press Play and see the value changing in the game.
    Right click on Canvas > UI > Scrollbar, and Right click on Canvas > UI > Dropdown
    Add FSM to Dropdown. Add UI Dropdown Clear Options and UI Dropdown Add Options actions to it.
    Give it 3 options, name them.
    Add new state. Right click > Global Transition > UI Events > UI INT VALUE CHANGED
    12:55 Add Get Event Int Data action. Create new variable selectedIndex.
    Press Play
    13:42 Right click on Dropdown game object > UI > Image, name it colorSwatch. > Variables tab in Dropdown FSM > Variable Type > Array, name it ‘colors’. Array Type > Color. Size - 3. Set colours to the order set in the options dropdown.
    14:52 Add ‘Array Get’ action to FSM. Array > colors (to get a value from it). Index is numbered position in the array, Index > Use Variable > selectedIndex. Store Value > New Variable, name it selectedColor. Add UI Graphics Set Color action, Specify Game Object as colorSwatch, Color > use variable >selectedColor. Press Play. You can select colorSwatch colour.
    Making an input field
    16:03 Right click Canvas > UI > Input Field
    16:57 Customise and add functionality. Add FSM to InputField game object. Add UI Text Set Text action, Specify Game Object as Placeholder text. Write text for it. Press Play - placeholder text says what you wrote for it.
    17:31 Make it do something with your name when you enter it. Right click InputField > UI > Text. Add State to InputField FSM, name it Update Text. Right click the state > Add Global Transition > UI Events > UI END EDIT. Add Get Event Data String action. New Variable, call it ‘name’. Add Build String action, put it after the 1st action. String Parts - 3: Hello - name - !, uncheck Add To End.
    18:57 Need to store elements in a new string variable. Store Result > New Variable, name it ‘greeting’. Add UI Text Set Text action, Specify Game Object as result game object, set Text as greeting variable. Press Play, you can enter your name, press Enter to get your personalised greeting.
    19:53 Wrap up. Learned to make a button you can click, a toggle you can check/uncheck and displays its status, toggles and sliders you can use to display a float variable, a dropdown menu that changes the colour of a swatch, and an Input field you can enter your name into to receive a personalised greeting.

  • @jenniferdavenport3865
    @jenniferdavenport3865 Рік тому +4

    IF you only have the Button TextMeshPro and can't find the normal Button----at --00:48-- ish-- go to Canvas--->UI--->Legacy---->Button

  • @xrplayground
    @xrplayground 3 роки тому +3

    Love the dry humour :) Could you please create playmaker tutorials for VR too?

  • @colettelevesque249
    @colettelevesque249 3 роки тому +2

    The humour is so good. Let's create a slider 😂 .

  • @zacharydiasio655
    @zacharydiasio655 3 роки тому +1

    Actually laughed at every bit, well done

  • @crusenho
    @crusenho 3 роки тому

    I love the comedy in this video!

  • @im_Dafox
    @im_Dafox 3 роки тому

    Really gotta thank you for your videos. So useful and fun to watch :]

  • @keelfly
    @keelfly 4 роки тому +18

    A great tutorial. Gives us all the details to make a menu as simple or complex as we need. One thing is not there. How do we make this menu appear and disappear in our game?

    • @TimM-kz1vl
      @TimM-kz1vl Рік тому

      Basially you'd have the action "Activate Game Object" run with 'activate' unchecked, when you press a button. Ex: When I press 'esc', it pauses the game and activates the UI then makes sure the mouse isn't locked if it is. When you press 'esc' again, it deactivates the UI and relocks the mouse cursor, if need be.

  • @StefanBoeykens
    @StefanBoeykens Рік тому

    Using Playmaker since several years and now discovered the UI events (but also a bit confused, initially, as the UI components used are now "legacy")

  • @KennyCouling
    @KennyCouling Рік тому

    Tricking us into thinking we have any control in our lives 😂👍

  • @HamzaSajid-i8m
    @HamzaSajid-i8m Рік тому +5

    Colour Not Visible Issue Solved.
    For anyone having this problem when you are setting your colors in your array make sure the one labeled "A" below the R G B is all the way to the right. This is the opacity of the color which if it's like mine it was set to invisible by default.

  • @verast
    @verast Місяць тому

    13:28 if you don't see numbers for "Get Event Int Data", check "Debug" at the bottom

  • @Gonzo99
    @Gonzo99 2 місяці тому

    Can't stop thinking about crosswalk buttons

  • @jakechen4020
    @jakechen4020 3 роки тому

    Thank you for these new turtorials, 感谢!

  • @GhettoWxzrd
    @GhettoWxzrd 7 місяців тому

    i swear op wanted to be a comedian, but got caught up in the wrong job lol.

  • @AidenWolf97
    @AidenWolf97 Рік тому

    sidewalk buttons work in a weird way, every time you press it it will set it as if it was pressed for the first time

  • @MatthewCawley
    @MatthewCawley 3 роки тому +2

    +1 for cooking the plant based patty :D

    • @HutongGamesLLC
      @HutongGamesLLC  3 роки тому +1

      Full plant based slider tutorial coming soon 😋

    • @MatthewCawley
      @MatthewCawley 3 роки тому

      @@HutongGamesLLC I've subscribed and tapped the bell, don't let me down :D

  • @dancaste2216
    @dancaste2216 4 роки тому +15

    Good tutorial! Everything worked as expected but I'm having an issue with the Dropdown when changing the swatch's color.
    For some reason it stops being visible, but it's still there and enabled. I can select it in the Hierarchy and its color is changing to red, green and blue as it should but visually 'it's gone'.
    I did step by step what the tutorial said so I imagine others will have the same issue. If you can share the solution, I'll appreciate it!

    • @sathorr.s.e5030
      @sathorr.s.e5030 4 роки тому +1

      same here

    • @HiddenLightDev
      @HiddenLightDev 3 роки тому +27

      For anyone having this problem when you are setting your colors in your array make sure the one labeled "A" below the R G B is all the way to the right. This is the opacity of the color which if it's like mine it was set to invisible by default.

    • @slowgoins
      @slowgoins 3 роки тому +1

      @@HiddenLightDev Thank you so much for solving this issue! I spent 20 minutes trying to debug this and couldn't figure it out.

    • @dancaste2216
      @dancaste2216 3 роки тому +1

      @@HiddenLightDev Worked like a charm, thank you sir!

    • @shadowaki3939
      @shadowaki3939 3 роки тому +1

      @@HiddenLightDev thank you!

  • @HTLugnut
    @HTLugnut 2 роки тому +1

    on this episode when I hit play my color swatch does not change colors. It disappears. So no clear on some of the instructions. I tried following it three times for same effect.. Something either I am missing or not shown in the tutorial.

  • @cesarsfalcao
    @cesarsfalcao 9 місяців тому

    Be sure to check the Debug box in the actions @9:01 to see the values

  • @torontogamestudio2991
    @torontogamestudio2991 2 роки тому +3

    For the drop-down button tutorial when ever I switch colors the color Swatch just disappears, any clues why this is happening?

  • @troyna77
    @troyna77 Рік тому

    @13:43 The old "Option A" , "Option B" and "Option C" was being included with red, green and blue.
    So I had to Select Dropdown. then Inspector > Dropdown > Options. I then had to click on minus button to remove ""Option A" , "Option B" and "Option C". If anyone knows a better way, please reply...

  • @99club14
    @99club14 2 роки тому

    holy shit you go fast

  • @CombatWhale
    @CombatWhale 4 місяці тому

    Anyone know how you get a larger text entry field like he does at 1:34 ??

  • @corbi7703
    @corbi7703 2 роки тому +1

    How can I make a Butten which is only clickable if I check the Toggle UI Butten?

  • @bytesandbudgets
    @bytesandbudgets 6 місяців тому

    Great video, very funny. One thing I am struggling with is the fact that whenever I press play after setting up dropdown and the colorSwatch, it disappears (only the color swatch). Any idea, why that is?

  • @cesarsfalcao
    @cesarsfalcao 9 місяців тому

    The Dropdown part @11:09 is broken with TMP dropdown :(

  • @itodobien1396
    @itodobien1396 4 місяці тому

    Belly buttons.... killed me

  • @JosephAli93
    @JosephAli93 Рік тому

    I just started learning playmaker, and I have a problem:
    I create a button that when clicked should rotate a cube, I used set rotation action for that, but it is not working.
    I changed the action to set matrial, and the material changed as expected !|
    why set rotation not working....

  • @slowgoins
    @slowgoins 3 роки тому +1

    The "Label" child of the "Dropdown" game object seems to bugged for me (or i'm doing something wrong). When I changed the text in the "Text" section it resets upon save and only save. If I don't save it and run the game it will display the new text just fine. All other text fields in this tutorial were editable the same way except this specific field. Anyone know what might be going on here?

  • @TheSawyerK
    @TheSawyerK 3 роки тому

    These are all nice, but it only works if you have only one toggle button. With more than one toggle button, it toggles the bool in all of them.

  • @slowgoins
    @slowgoins 3 роки тому +3

    For anyone having issues getting the last section (Input Field action UI Text Set Text) to trigger properly: I had to have “Every Frame” toggled ON or it was taking like 3 strokes of the return/enter key. This solution has it trigger with just one, but not sure if this is a 'best practice' solution. If anyone else has another method please reply.

  • @ПавелЩетько-ы4й
    @ПавелЩетько-ы4й 3 роки тому

    8:50 не показывает значение слайдера, уже в двух проектах пробовал

  • @BazSupport
    @BazSupport 4 роки тому

    Keep these up!!!!

  • @styrofoam00000
    @styrofoam00000 2 роки тому

    I can't figure out how I would do something like let the player change the mouse sensitivity with a slider in the settings menu, particularly with the new input system? (am also using cinemachine as a 3rd person camera if that matters)

  • @aaronwise1089
    @aaronwise1089 3 роки тому

    okay so I want the cube to change to red when I click the redbutton and blue when I click the bluebutton
    how would I do that?

  • @corbywhite4662
    @corbywhite4662 3 роки тому

    thank you so much! Just a question on the input field. I have a riddle to be solved, so the player has to write a number value. If it is correct, another scene will load, If it false then he has to try again. I understand i have to use boolean, but i dont know how to connect it to the input fileld. How can i do it? Thank you in advance!

  • @ОлегМашков-я8х
    @ОлегМашков-я8х 2 роки тому

    in my project, I use Text Mesh Pro, and unfortunately the example shows a module for working simply with text. Is it possible to somehow bypass this point or insert some kind of crutch?

    • @StefanBoeykens
      @StefanBoeykens Рік тому

      You can always fall back on the generic "Get Property" and "Set Property" and drag the component (not the Gameobject) into the field. This way you can access all attributes of that component, but beware that it may be named a little different than what Unity displays. The Text and Dropdown are now "legacy".

  • @jvdongames
    @jvdongames Рік тому

    Why's no one talking about how to use only keyboard/gamepad on the menu. Everyone is just talking about OnClick action. Is using keyboard keys not supported in playmaker.

  • @hidden13x
    @hidden13x 2 роки тому

    Awesome videos, Hutong Games rep! Any idea why my dropdown image disappears when I select any of the options, rather than showing me one of the colors?

    • @cmccune13
      @cmccune13 2 роки тому

      same thing is happening for me - when I look at the game object the color is correct, but there is some weird rendering thing going on like it's not refreshing

    • @hidden13x
      @hidden13x 2 роки тому +2

      @@cmccune13 - Hidden Light • 1 year ago
      “For anyone having this problem when you are setting your colors in your array make sure the one labeled "A" below the R G B is all the way to the right. This is the opacity of the color which if it's like mine it was set to invisible by default.” This was solved below and thanks to you, I found it. Haha

  • @MGervais55
    @MGervais55 3 роки тому

    I 've tried the GetEventIntData to capture the user choice on a Dropdown. It works fine with the regular UI Dropdown but not with the TextMeshPro dropdown. Any reason for that ? and what would be a work around if I really want to use a TMP dropdown ? Thank for the tutorial

  • @AquaWaifu
    @AquaWaifu 4 роки тому

    The button part make you sound like
    Mattias Pilhede

  • @redabeg
    @redabeg Рік тому

    Anybody knows how to save a slider value and position? Please, help.

  • @programmingnyor7850
    @programmingnyor7850 3 роки тому

    My image doesn't show the color? but it deed change in the color section of image in inspector.
    Can someone help me?

    • @juliannesharer
      @juliannesharer 3 роки тому +2

      I had an issue of the color swatch not changing during play. It disappeared actually. The Alpha channel of all 3 colors in my colors array was 0. He silently sets that to 255 when he sets up the array.

    • @danielnorton9803
      @danielnorton9803 2 роки тому

      @14:rr he changes the alpha

  • @shaneelliott3612
    @shaneelliott3612 Рік тому

    I feel sorry for the crosswalk button. Is there a GoFundMe we can give to??

  • @threeone117
    @threeone117 Рік тому

    no support for belly buttons?!!? nooo! how i do the innie or outie states!!

  • @Moon_579_XD
    @Moon_579_XD 3 роки тому

    Hello 2chainz !

  • @usixasix
    @usixasix Рік тому

    my colors not change

  • @torontogamestudio2991
    @torontogamestudio2991 2 роки тому

    Hello 2Chainz 😂

  • @kylemakesgames
    @kylemakesgames 10 місяців тому

    Color swatch no longer seems to work according to tutorial. On selction of color mine disapears. But no one is getting help here for that so guess this is a out of date tutorial now.

    • @HutongGamesLLC
      @HutongGamesLLC  10 місяців тому

      Not sure I understand what you mean. The color selector is a popup, it's supposed to disappear after you select the color. Or do you mean something else?

    • @kylemakesgames
      @kylemakesgames 10 місяців тому

      Found the solution. When your setting up the color array now it has a default of 0 alpha so when you go to pick a color you get the zero alpha. This makes it seem like it is disapearing. This does not happen in the tutorial video.@@HutongGamesLLC

    • @HutongGamesLLC
      @HutongGamesLLC  10 місяців тому

      Thanks for letting us know. I'll look into setting the default alpha. I agree it's potentially confusing.

  • @NovleRogers
    @NovleRogers 10 місяців тому

    Mmmmmm sliders 😋

  • @josimarfpsbrasil168
    @josimarfpsbrasil168 3 роки тому

    QUAIS SÃO OS LIMITES DO PLAYERMAKER?

  • @GuidoGautsch
    @GuidoGautsch 4 роки тому

    People who don't know that a slider is a small burger will be Hella confused at 08:00 😂

  • @CadaverKuma
    @CadaverKuma 4 роки тому

    Nice nice nice NICE NICE NICE NICE

  • @Metrawolf
    @Metrawolf 2 роки тому

    Harboring a *_WHAT_*

  • @andrewmartin2341
    @andrewmartin2341 3 роки тому +1

    I'm really disappointed. No belly buttons?

  • @sagatyba
    @sagatyba 4 роки тому

    Fanny haha

  • @nicoletang1834
    @nicoletang1834 2 місяці тому

    Hahahahahahahah!

  • @utkuyazc5848
    @utkuyazc5848 3 роки тому

    Unsubscribed. Refunded. I was looking for belly button support.

    • @HutongGamesLLC
      @HutongGamesLLC  3 роки тому +1

      Belly Button support was dropped because of all the maintenance issues related to lint.

    • @troyna77
      @troyna77 Рік тому

      the next tutorial is about belly dancing. is that good enough ?