NEW INPUT SYSTEM in Unity

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 842

  • @Brackeys
    @Brackeys  4 ปีที่แล้ว +287

    Hey everyone!
    To those of you who can't find the package: Unity has moved the "Show Preview Packages".
    You can now find it under Edit -> Project Settings -> Package Manager -> Enable Preview Packages.
    If you check that box, you should see preview packages in the Package Manager! :-)
    Stay awesome!

    • @workflowinmind
      @workflowinmind 4 ปีที่แล้ว +7

      Hey brackeys, any update on this, it seems to have changed in the way you initialize and reference the Input class...

    • @workflowinmind
      @workflowinmind 4 ปีที่แล้ว +7

      For those looking for an answer, I found it in this Unity Stream at 19:16 (You have now a Player Input Component)
      th-cam.com/video/gVus9PqfgAM/w-d-xo.html

    • @SirArDheL
      @SirArDheL 4 ปีที่แล้ว +8

      Please, we need an updated version of the input system video.

    • @revengerwizard
      @revengerwizard 4 ปีที่แล้ว +2

      @@SirArDheL true, now with the 1.0 version there are many new things

    • @psinjo
      @psinjo 4 ปีที่แล้ว +1

      I know the system has changed a lot in the last year, is this tutorial still up to date enough to make it work?

  • @cbox_
    @cbox_ 5 ปีที่แล้ว +1121

    TIP For those doing the tutorial more recently, you can no longer drag the file into the inspector as they changed the backend. You can just do controls = new InputMaster(); in awake to create a new instance of the object.

    • @Kartikey007agrawal
      @Kartikey007agrawal 5 ปีที่แล้ว +4

      I cannot get the Input working with this. I have enabled the control in OnEnable() . Created using new InputMaster() but I still cannot get keyboard input to work with the new system

    • @OverInfrared
      @OverInfrared 5 ปีที่แล้ว +5

      @cbox Thank you that was very weird problem.

    • @BlaZeLiink
      @BlaZeLiink 5 ปีที่แล้ว

      thank you , solved my problem!

    • @pontosinterligados
      @pontosinterligados 5 ปีที่แล้ว +12

      That made sense, but I am getting some NullReferenceException from the InputMaster.Initialize(). Now updated to Unity 2019 and seems this video is already obsolete for beginners.

    • @jayit6851
      @jayit6851 5 ปีที่แล้ว +10

      This should be pinned @Brackeys

  • @NewbNinjas
    @NewbNinjas 2 ปีที่แล้ว +25

    This was one of the first videos that I watched when I began my Unity journey. I'm now coding dedicated servers with fusion + azure playfab for an online space shooter game I created as a result of following these tutorials. How far I've come in 5 months is amazing. I stumbled upon this video and noticed my comment from 5 months ago!

    • @OminousBlast
      @OminousBlast ปีที่แล้ว

      Amazing man! Whats your game called I'd love to play it

  • @andheg52
    @andheg52 2 ปีที่แล้ว +110

    If you are watching this tutorial now and are looking for the "dpad" option, you have to create an action then change the action type from "Button" to "Value" in menu to the right. Then you have to change the Control type (drop down will appear) from "Button" to "Vector2". Then you can choose an "up/down/left/right composite".

    • @SgtBurned
      @SgtBurned 2 ปีที่แล้ว +2

      Now you can set the Control type to "DPad" and it will allow you to create an "Up/Down/Left/Right Composite" from there.

    • @toast3
      @toast3 2 ปีที่แล้ว +1

      Thank you!

    • @vahagnmikhailov3698
      @vahagnmikhailov3698 2 ปีที่แล้ว +1

      Oh,I want to to thank You soooo much.

    • @herbertwyndham
      @herbertwyndham 2 ปีที่แล้ว

      Thank you! One of the hardest things about learning Unity is that the buttons always get moved and renamed, and then it's hard to follow the tutorials, even on their official site.

    • @inf1nityz3r0
      @inf1nityz3r0 ปีที่แล้ว

      thanks man

  • @SoggyPringles
    @SoggyPringles 3 ปีที่แล้ว +5

    Even though you may be gone @Brackeys, you still end up helping in everyway I need. While I hardly knew ye, ye still helped out more than I ever could have thought and for that, you have my eternal gratitude and thanks.

    • @ski_kid
      @ski_kid 5 หลายเดือนก่อน

      what happend with him?

  • @andythayer5493
    @andythayer5493 4 ปีที่แล้ว +1

    Once again, I search the webs for tutorials, find garbage, but then wait - there's Brackeys! Saved the day again, man! Thanks so much!

  • @rorschacht8478
    @rorschacht8478 4 ปีที่แล้ว +3

    To anyone as stupid as me (welcome to the club) - You can have both the new and the old input systems enabled simultaneously (without errors!) by going to Project Settings > Player > Other settings > Enable both
    This way your game isn't an error simulator while converting to the new input system. Well done Unity, for thinking about this.
    Also; Great tutorial Asbjørn, thank you! (I'll call you by name from now on, since Brackys is no more... *Sad noises*).

    • @Destrio_Fury
      @Destrio_Fury 3 ปีที่แล้ว

      Great! I deleted the project which I merged from two different project consisting different input systems, I wasn't able to keep up with the errors. If I wanted to continue, I would have to write other side from scratch with all the new way or older input dealings.
      Every time I successfully implement something in unity, just to find out that next feature I want to add is not compatible with my just implemented effect. If I want to use the functionality available, It's either remake using the available tools or code the features I want to add from scratch without using those tools.
      In a single day first Cinemachine, then input system got me done... Now I am thinking of prototyping the same thing using these two... Gods have mercy on me. And give me wisdom to check for any other tools I could take advantage of, with prior notice.

  • @antoniovedivici6202
    @antoniovedivici6202 4 ปีที่แล้ว +64

    In case of you are coming from the "FPS tutorial" and got question marks over your head, why the fudge there is no >mouse control< explanation...:
    mouseX = Mouse.current.delta.x.ReadValue() * mouseSensitivity * Time.deltaTime;
    mouseY = Mouse.current.delta.y.ReadValue() * mouseSensitivity * Time.deltaTime;

    • @willb4838
      @willb4838 4 ปีที่แล้ว +1

      thx iv'e been looking for this

    • @Rook-ec7sl
      @Rook-ec7sl 4 ปีที่แล้ว

      you are a legend

    • @Jojo43O9
      @Jojo43O9 4 ปีที่แล้ว

      TY

    • @nagybalint1474
      @nagybalint1474 3 ปีที่แล้ว

      what the heck is that syntax xD

    • @pitchYellow2973
      @pitchYellow2973 3 ปีที่แล้ว

      this comment is the best tutorial for the new input system on the entire internet

  • @-.._.-_...-_.._-..__..._.-.-.-
    @-.._.-_...-_.._-..__..._.-.-.- 4 ปีที่แล้ว +10

    If you can't drag in the InputActionAsset into your script (as shown at 11:50) because the field isn't there, instantiate the object in your Awake() method instead. Do something like this:
    private void Awake()
    {
    controls = new Controls();
    controls.Player.Shoot.performed += ctx => Shoot();
    }
    Also, for 13:37, if you're getting errors after testing the code, ensure the return type ('Vector2' in the video) agrees with the return (composite) type of the action.

    • @bluefakederblauere2099
      @bluefakederblauere2099 3 ปีที่แล้ว +2

      dont forget .Enable()! else it somehow doesnt work

    • @SyPhase
      @SyPhase 2 ปีที่แล้ว +2

      controls = new InputMaster();
      But I got what you meant, and it SAVED me, thanks

    • @augustomarques292
      @augustomarques292 2 ปีที่แล้ว +1

      thx!

  • @NewbNinjas
    @NewbNinjas 2 ปีที่แล้ว +11

    For you guys who get the error: NullReferenceException: Object reference not set to an instance of an object Player.Awake ()
    Just add this code at beginning of the Awake() block..... :
    controls = new InputMaster();
    This should fix the issue, this had me stumped for 20 minutes. Thanks to everyone who continues to help me along the way. :)

    • @vedarovski4110
      @vedarovski4110 2 ปีที่แล้ว +1

      Thanks a lot. You saved me.

    • @beesyrup5494
      @beesyrup5494 2 ปีที่แล้ว

      You are a saint and hero

    • @alpha3836
      @alpha3836 2 ปีที่แล้ว

      it doesn't work for some reason
      here's my code:
      public class PlayerScript : MonoBehaviour
      { public InputMaster controls;
      void Awake()
      {
      controls = new InputMaster();
      controls.Player.Shoot.performed += s => Shoot();
      }
      private void OnEnable()
      {
      controls.Enable();
      }
      private void OnDisable()
      {
      controls.Disable();
      }
      void Shoot()
      {
      Debug.Log("WE shot a bullet!");
      }
      }

  • @WesHawkins0
    @WesHawkins0 4 ปีที่แล้ว +3

    Even though it's a few years old, this vid helped me get a jump start on the new input system. Thank you my friend.

  • @pranavbadrinathan6693
    @pranavbadrinathan6693 4 ปีที่แล้ว +56

    Who's here after the Brackeys team have retired? (from TH-cam). Its been great, good luck to the Brackeys team!

  • @joeyhernandez3925
    @joeyhernandez3925 5 ปีที่แล้ว +87

    There seems to be a lot that has changed. Whilst I have figured most of it out myself I would love an updated video ;). Either way great vids Brackeys!

    • @blackhawk827
      @blackhawk827 3 ปีที่แล้ว +2

      did the code change? if yes do u still have it after a year?
      could i have it?

  • @totallycrispy1109
    @totallycrispy1109 5 ปีที่แล้ว +2

    Brackeys, I really appreciate your content. In 3 months I went from knowing nothing about Unity, to having plenty of knowledge. Thank you, you've been a big help to me. Keep up the good work!!!

    • @monstereugene
      @monstereugene 2 ปีที่แล้ว

      im sorry i just found this ironic because he's done with making videos... hope you're well :)

    • @totallycrispy1109
      @totallycrispy1109 2 ปีที่แล้ว

      @@monstereugene same

  • @folfex1971
    @folfex1971 4 ปีที่แล้ว +54

    the dpad is now labeled as 2d vector, you right click the actions and it is listed there

    • @ThomasJeff4s0n
      @ThomasJeff4s0n 4 ปีที่แล้ว +1

      THANK YOU!

    • @45sbdfbfd9
      @45sbdfbfd9 3 ปีที่แล้ว

      Thanks a lot!

    • @mstyslava
      @mstyslava 3 ปีที่แล้ว

      Thank you!

    • @warningshotdesigns
      @warningshotdesigns 2 ปีที่แล้ว +2

      I can't seem to find that at all, I only see add binding, add positive/negative binding, add binding with one modifier, add binding with 2 modifiers.

    • @Nicken_Tenders
      @Nicken_Tenders 2 ปีที่แล้ว

      @@warningshotdesigns If you right click the action itself, it'll ask you if you want to "Add 2D Vector Composite".
      I wish I could tell you why that's there, hidden away, but... ¯\_(ツ)_/¯

  • @maltedwheaties3339
    @maltedwheaties3339 4 ปีที่แล้ว +129

    Alot has changed in the 2020.1, and there aren't that many videos covering it...

    • @psinjo
      @psinjo 4 ปีที่แล้ว +14

      I too would love to see an updated video :)

    • @robertward960
      @robertward960 4 ปีที่แล้ว +4

      @@psinjo I second that

    • @MoonLiteNite
      @MoonLiteNite 4 ปีที่แล้ว +14

      As someone who is new to unity, this is killing me. At least i got basic movement to work. Now trying to get it to work with touch input, NOTHING on youtube on it:(

    • @zymolyticzulu5310
      @zymolyticzulu5310 4 ปีที่แล้ว

      @@MoonLiteNite same

    • @kyrannosaurgaming8485
      @kyrannosaurgaming8485 4 ปีที่แล้ว

      There is a video here of someone making basic FPS controls: th-cam.com/video/Bv3rYJMTmyc/w-d-xo.html

  • @theeternal6890
    @theeternal6890 3 ปีที่แล้ว +58

    *I feel the older system was much easier.*

    • @thatsalot3577
      @thatsalot3577 3 ปีที่แล้ว +5

      yes😢

    • @jonathanpaz8974
      @jonathanpaz8974 3 ปีที่แล้ว

      agreed

    • @HomingAsatoMass
      @HomingAsatoMass 3 ปีที่แล้ว +1

      As are the input systems in both other engines I have been using so far lol. I have no idea who thought this would be a good idea

    • @toastyshrimp1882
      @toastyshrimp1882 3 ปีที่แล้ว +13

      @@HomingAsatoMass it IS a good idea. You no longer clog the update function with endless calls, you can fire events, and setting up multiple input systems is literally seamless. Have you written a PlayerController that was even mildly complex? Unity falls apart damn near instantly on anything other than very basic movement.
      What exactly is bad about it? That it's more complex? I hate to break it to you, making a game is complex. If you think handling events for input is too complicated, you're never going to ship a game. Not only that, but you even get the option of keeping the old input system, although god knows why someone would want to.

    • @HomingAsatoMass
      @HomingAsatoMass 3 ปีที่แล้ว +4

      @@toastyshrimp1882 you can design a complex system in a way that makes it intuitive to approach for people, and takes care of certain barriers for them until they choose to engage with those aspects of the system.
      (I think I already wrote you a reply once, no idea what happened to that. This is the short version)

  • @ralofpatel470
    @ralofpatel470 6 ปีที่แล้ว +8

    I find this more complicated than earlier one. But it is more powerful.

  • @cheker12354
    @cheker12354 6 ปีที่แล้ว +4

    With this event based system, programming inputs is going to be way more structured, love it!

  • @aussieraver7182
    @aussieraver7182 2 ปีที่แล้ว +4

    9:20
    If you cannot see the InputManager property in the inspector, you may need to initialise it programatically.
    Within the void Awake() method, write this:
    InputMaster = new InputMaster();

    • @ichoupettev4661
      @ichoupettev4661 2 ปีที่แล้ว +2

      Thanks for the tip

    • @SyPhase
      @SyPhase 2 ปีที่แล้ว +2

      controls = new InputMaster();
      Thanks man, I was wondering what was wrong.

  • @beerfrad6447
    @beerfrad6447 6 ปีที่แล้ว +12

    My thoughts before watching were "Oh why do we need this, the old system is good enough, I can do anything there".
    I'm honestly surprised how much better this is and I did not expect this. I never even realized how clunky the old system was, and I just kind of got used to writing the input checks in Update() which in hindsight is so messy readability-wise.
    I can't wait for the new input system to make into unity proper now. And thanks for the video!

    • @47Mortuus
      @47Mortuus 4 ปีที่แล้ว +3

      I don't get it.
      Declaring 20 delegates in an Awake() or listening for 20 Input states in Update() is like exactly the same "mess" - all of it happens in the same class either way.
      Unless... Of course... you don't have an InputManager and your copy-pasted Brackeys scripts are like "Weapon: MonoBehaviour { Update() { if(Input([...]

  • @cloudgazer3d
    @cloudgazer3d 4 ปีที่แล้ว +235

    "This year is gonna be fun" didn't age well ^^'

    • @QS1597
      @QS1597 4 ปีที่แล้ว +2

      It did not

    • @thesweetembraceofnonexiste3740
      @thesweetembraceofnonexiste3740 4 ปีที่แล้ว +31

      I mean, 2019 *was* okay. It's just *2020* that's going down the drain.

    • @pandacatplayz
      @pandacatplayz 4 ปีที่แล้ว +5

      2020 score: 1
      2019 score: 300

    • @RealCaptainAwesome
      @RealCaptainAwesome 4 ปีที่แล้ว +7

      Wait until you get the July update.

    • @zzedixx
      @zzedixx 4 ปีที่แล้ว +6

      @@pandacatplayz actually, 2019 score: 300, 2020 score: cOrOnAvIrUs
      even worse, brackeys ended his channel (no more new uploads)
      2020 is the worst year in history.

  • @MrEnabie22
    @MrEnabie22 ปีที่แล้ว

    This is for real one of the best videos. Every time I come back here to set it up in a new project. Could definately work on my memory 🤣

  • @susu5331
    @susu5331 2 ปีที่แล้ว +14

    This tutorial is very outdated (unlike his other great tutorial vids). If you're watching this cuz you're like me (being a big fan and wanting to learn the new input system), choose another tutorial, far too many changes have taken place since Unity 2019 and the script shown here is basically of zero use at this point.

  • @Bonfere
    @Bonfere 3 ปีที่แล้ว +4

    I miss Him SOOOOO Much!
    :(

  • @eiromplays
    @eiromplays 6 ปีที่แล้ว +93

    Another good video from my favorite youtuber. On my birthday :D
    Keep up the good work man.

    • @jozatheman
      @jozatheman 6 ปีที่แล้ว +4

      Happy bday

    • @tapiocaseca6935
      @tapiocaseca6935 6 ปีที่แล้ว

      Hapy barthdei

    • @eiromplays
      @eiromplays 6 ปีที่แล้ว +1

      @@tapiocaseca6935 Thanks

    • @eiromplays
      @eiromplays 6 ปีที่แล้ว

      @@jozatheman Thanks

    • @eiromplays
      @eiromplays 6 ปีที่แล้ว

      vaidik Gupta thx man and say happy bday to your friend aswell from me

  • @thecodeanvil5779
    @thecodeanvil5779 3 ปีที่แล้ว +2

    For anyone who installed the new system and your project is broken, go to Edit>Project Settings>Player>Other Settings and then find 'Active Input Handling' and change it to either 'Input Manager(Old)' or 'Both' and then your old code will work. Hope this helps!

    • @UrbanArT69
      @UrbanArT69 3 ปีที่แล้ว

      Sheesh thank you for this, didn´t even know this was a thing

    • @gomango99
      @gomango99 3 ปีที่แล้ว

      You're a lifesaver! For some reason I couldn't get keyboard input to work with the new one but still wanted Controller support

    • @Buxzy6613
      @Buxzy6613 3 ปีที่แล้ว

      wow bro you are a life saver jesus been implementing Input in other functions but it dint seem to work since I have the new input system some tutorials that i find have barely any new input system fixes thx for this comment ill sub for your channel just by that

  • @emilemil1
    @emilemil1 4 ปีที่แล้ว +1

    I haven't checked and I'm not entirely familiar with C# syntax, but I believe you can also do:
    controls.Player.Movement.performed += Player.Move
    void Move (InputAction.CallbackContext context) { ... }
    In case you want to get rid of the intermediate lambda.

  • @darkfafi
    @darkfafi 6 ปีที่แล้ว +189

    You should really not use anonymous methods here... For every +=, you have to call a -= as well. Else the game breaks because events are still triggered after destruction, because the methods live within their own reference.

    • @SkrekkLich
      @SkrekkLich 6 ปีที่แล้ว +25

      Maybe directly pass the context, this way he wouldn't need the lambda ... Or how he calls it "the weird syntax"

    • @proe4414
      @proe4414 6 ปีที่แล้ว +47

      Yeah, he should have mentioned that. Ohh I already see headaches from beginners with this new system...
      It hurt me bad when I heard "the weird syntax" D:

    • @Trojaner
      @Trojaner 6 ปีที่แล้ว +14

      Yes, one should definitly do -= when OnDestroy occurs; otherwise GC will not be able to collect the object.

    • @seansopata5121
      @seansopata5121 6 ปีที่แล้ว +35

      Well, after watching many of his videos, I've been less than impressed with his programming. Functional, sure, but seriously terrible for optimization.

    • @HippieJavelin99
      @HippieJavelin99 6 ปีที่แล้ว +1

      So... what's the best practise?

  • @jabocdawookie123
    @jabocdawookie123 4 ปีที่แล้ว +1

    For anyone having trouble with this, delete any input action asset that you have in your assets. Add the player input component to your player object in the inspector. Then click on create actions and use that, it will automatically create move and fire action for you.

  • @mojojojo5304
    @mojojojo5304 3 ปีที่แล้ว +2

    You can enable both input system.
    Edit > project settings > player > configuration > active input handling.

  • @KeithSwanger
    @KeithSwanger 6 ปีที่แล้ว +41

    Until this new input system becomes robust and reliable, I think Rewired is still the best input solution for Unity at the moment. It would be great to not have to rely on a third party though!

    • @freezxify
      @freezxify 6 ปีที่แล้ว +2

      Came here to say the same.
      Not even close to the robustness and feature set of ReWired.

    • @songersoft
      @songersoft 6 ปีที่แล้ว +1

      It reminds me of Rewired tho. Glad to hear Rewired is still a good purchase.

    • @Trojaner
      @Trojaner 6 ปีที่แล้ว

      /sellout

    • @Trojaner
      @Trojaner 6 ปีที่แล้ว +3

      Why would anyone use some third party asset when you can have a standard official one supported by Unity

    • @KeithSwanger
      @KeithSwanger 6 ปีที่แล้ว +23

      You're basically asking: Why does the Unity Asset Store exist? Come on, dude.

  • @ArthurCousseau
    @ArthurCousseau 6 ปีที่แล้ว +5

    If I were a beginner, at 15:20 I could basically hear "or you can forget the last 15 minutes and just write 3 lines of code" :D

  • @jayjoonprod
    @jayjoonprod 3 ปีที่แล้ว

    It´s Christmas, I´m interested in Unity new input system and youtube recommends just the right video for me

  • @alinawaz4034
    @alinawaz4034 6 ปีที่แล้ว +2

    Unity is going amazing day by day!!!

  • @umaryusuf12
    @umaryusuf12 6 ปีที่แล้ว +5

    Yooo finally a new video
    I literraly wait all week 4 new videos
    Even I don't use that 1 in particular brackeys just makes it so fun .
    Tnx a bunch guys keep up the good work👍👍

    • @clamum
      @clamum 6 ปีที่แล้ว +1

      LITERALLY LITERALLY LITERALLY LITERALLY LITERALLY LITERALLY LITERALLY

  • @falxie_
    @falxie_ 4 ปีที่แล้ว

    Thanks Brackeys, gonna miss your videos

  • @joshbishop
    @joshbishop 6 ปีที่แล้ว +3

    This is great! Dude, I love your videos, they're amazing and have taught me so much with Unity. Keep up the good work!

  • @stevencruz978
    @stevencruz978 4 ปีที่แล้ว +1

    Thank you for these tutorials Brackeys! 10,000x better than Unity docs and the hard work you put into these shows. :)

    • @leonardojensen2654
      @leonardojensen2654 4 ปีที่แล้ว

      Yeah brackeys really are on a god level when teaching people

  • @bence0302bence
    @bence0302bence 6 ปีที่แล้ว +1

    I've never been so hyped for a new feature in Unity before!

  • @sailinglighthouse144
    @sailinglighthouse144 6 ปีที่แล้ว +1

    Merry Christmas Brackeys, it must be Christmas, we got Unity

  • @varKristjansson
    @varKristjansson 6 ปีที่แล้ว

    I don't code but your voice is really nice and I like falling asleep listening to it

  • @i_am_reshad
    @i_am_reshad ปีที่แล้ว

    best explanation ever. be back Brackeys

  • @eclipixie536
    @eclipixie536 3 ปีที่แล้ว

    a bit of advice: you don't have to do the control scheme thing at 6:00; you can just set up multiple bindings in one action and make one for keyboard/mouse, and one for whichever controller you're using
    also you don't need the Using line up the top.

  • @rds6129
    @rds6129 6 ปีที่แล้ว

    This is basically the adapter design pattern, neat!

  • @miikey_lol
    @miikey_lol 6 ปีที่แล้ว +30

    Merry Christmas!

    • @sailinglighthouse144
      @sailinglighthouse144 6 ปีที่แล้ว

      it must be Christmas, we got Unity

    • @pixelcats2647
      @pixelcats2647 6 ปีที่แล้ว

      Christmas is gone

    • @miikey_lol
      @miikey_lol 6 ปีที่แล้ว

      @@pixelcats2647 only 362 days to the next one though!

    • @ForProsOnlyCom
      @ForProsOnlyCom 4 ปีที่แล้ว

      you are wrong

    • @miikey_lol
      @miikey_lol 4 ปีที่แล้ว

      @@ForProsOnlyCom at the time I wasnt

  • @94D33M
    @94D33M 5 ปีที่แล้ว

    10:25 what does brackeys say: And because the system is so cold ?
    13:14 what does this line mean? Does it mean that when the movement button is pressed, the Move() function is called?

  • @neozoid7009
    @neozoid7009 3 ปีที่แล้ว

    Awesome I also love working with unity every day

  • @emmanuelperez48
    @emmanuelperez48 3 ปีที่แล้ว

    oh Brackeys, I miss you so much

  • @ayansyed4586
    @ayansyed4586 4 ปีที่แล้ว +1

    Godot Input System Is so good compared to any other engines

  • @In-N-Out333
    @In-N-Out333 6 ปีที่แล้ว +5

    He uploaded this video on a Thursday. Hopefully he's going back to uploading twice a week, and this isn't just a delayed Sunday video.

    • @Dxpress_
      @Dxpress_ 6 ปีที่แล้ว

      The holidays just passed, so the uploads should be returning to normal.

  • @Tenzordk
    @Tenzordk 5 ปีที่แล้ว +67

    Hey bro(kyes) will you be making a updated version of the video? Thanks!

  • @KonnasTrashHeap
    @KonnasTrashHeap 5 ปีที่แล้ว

    This seems like a big improvement. Really hoping that the single generic "gamepad" scheme option implies we no longer have to do inputs for different types of pads (xbox, ps4 etc) separately.

  • @ehallam08
    @ehallam08 6 ปีที่แล้ว

    Dwight is the best! I'm actually watching the office right now.

  • @andreutu
    @andreutu 4 ปีที่แล้ว +9

    Make 2D movement and animations with this input system in Unity 2019

  • @mp3_45
    @mp3_45 3 ปีที่แล้ว +1

    Thnx
    Miss you guys...

  • @nonamegode2321
    @nonamegode2321 4 ปีที่แล้ว +6

    Is it possible That you can make aa new tutorial on how to use the InputSystem(it is a little out of date)?

  • @MikolasCage
    @MikolasCage 6 ปีที่แล้ว

    Keep up the great work man, always nice to see your notification pop up ^^

  • @Hamstermoviespro
    @Hamstermoviespro 6 ปีที่แล้ว

    Wow this looks awesome! Thanks for making a video on it!

  • @jaspreetmaan121
    @jaspreetmaan121 5 ปีที่แล้ว +6

    Unity is becoming unreal

    • @fastsolution
      @fastsolution 5 ปีที่แล้ว

      unity is smart they want unreal developers to switch

  • @whoisgliese
    @whoisgliese 4 ปีที่แล้ว +15

    The script isnt recognizing the InputMaster class, anyone else with this problem?

    • @ritumalhotra6477
      @ritumalhotra6477 3 ปีที่แล้ว

      I don’t know if you have fixed this problem or not but try typing ImputMaster instead of InputMaster.

    • @kristech_io
      @kristech_io 3 ปีที่แล้ว +1

      Make sure you first click the InputMaster asset, check the Generate C# Class checkbox, Apply it. Then in your script, because of an update, you'll have to do `InputMaster controls`. And in your `Awake()` method, you'll need to set it like so: `controls = new InputMaster()`. There's no more clicking and dragging it to a slot in the Inspector. You'll have to create it via your script.

  • @AmiDeLaMusique
    @AmiDeLaMusique 3 ปีที่แล้ว

    Awesome tutorial - has helped me a great deal. Very nice explanation of the mechanics behind the new input system. Thanks a lot!

  • @Daemonworks
    @Daemonworks 6 ปีที่แล้ว

    This is going to make it /so/ much easier for developers to ensure their games are friendly for folks who have physical disabilities.

  • @CookieCraftMedia
    @CookieCraftMedia 6 ปีที่แล้ว

    This new system looks much more simple yet you get a better overview for the controls of your project. These new features are nice and all but... I NEED THE UNITY DARK THEME

  • @betagamestudio5260
    @betagamestudio5260 4 ปีที่แล้ว +1

    Hey Brackeys, it would be great if you made a video on user customizable controls with the new input system.

  • @dean8235
    @dean8235 6 ปีที่แล้ว +11

    WHAAAAT?! A brackeys video i the last 6 months not sponsored by Unity...
    Wow

  • @Kolinnor
    @Kolinnor 6 ปีที่แล้ว +1

    I was really expecting the : "but first, this video is sponsored by unity" at 0:28

  • @thatanimeweirdo
    @thatanimeweirdo 6 ปีที่แล้ว

    I was literally thinking about asking you to make a video on it when I installed the preview package yesterday!

  • @Moon-to9se
    @Moon-to9se 6 ปีที่แล้ว

    Блин так, радует, что земляки входят в список. Brackeys, thanks!

  • @maistrogaming7911
    @maistrogaming7911 4 ปีที่แล้ว

    Wtf....I almost broke my glasses and my eyes and my brain....at once.... Man what a complex video...or a youtuber to be exactly

  • @priskobanoza1662
    @priskobanoza1662 5 ปีที่แล้ว

    Hey can you help me... I want to make a game in uniry but I have errors with my unity... this error appear in the first time I install unity... when I open unity I have 4-5 red stamp in my console that only showing my time... like [10:14:10] ... I dont know what I must do... I try to uninstall my unity and install it again but I still have this problems... can you help me how to fix this errors Please....

  • @wombatZ
    @wombatZ 6 ปีที่แล้ว

    Merry Christmas Brackeys

  • @Vimerum
    @Vimerum 6 ปีที่แล้ว +10

    Is there a easy way of changing the inputs in-game with this new system? Because the old one is pretty hard to do so without an asset from asset store.

    • @wokarol
      @wokarol 6 ปีที่แล้ว +3

      As far as I know, they will made an API for it

    • @Vimerum
      @Vimerum 6 ปีที่แล้ว +1

      @@wokarol That would be great!

    • @Owen3H
      @Owen3H 6 ปีที่แล้ว +1

      Just use an input manager.

    • @Octamed
      @Octamed 6 ปีที่แล้ว +5

      That is half the reason they're making this. It'll come

    • @ZoidbergForPresident
      @ZoidbergForPresident 6 ปีที่แล้ว +1

      Like changing the input asset I guess, on runtime? But this video doesn't explain that...
      It'd be nice too to select a specific scheme depending on the current keyboard layout so that players can start playing whether they have a qwerty or azerty layout...

  • @atmunn1
    @atmunn1 6 ปีที่แล้ว +1

    this is amazing i'm never using the old system again

  • @obalfaqih
    @obalfaqih 6 ปีที่แล้ว +1

    Thanks! Pretty informative as always 👌🏻

  • @EdgarsLS
    @EdgarsLS 3 ปีที่แล้ว +1

    10:05 "We shot the sheriff, but did not shoot no deputy!"

  • @gloriousptr
    @gloriousptr 6 ปีที่แล้ว

    Merry Christmas fella

  • @klerta
    @klerta 6 ปีที่แล้ว

    yes, I've been waiting for this!!

  • @XtroTheArctic
    @XtroTheArctic 4 ปีที่แล้ว

    I really can't believe that you defined an extra lambda method instead of simply applying the correct event signature to the Shoot method and add it to the event directly.

  • @vegguid
    @vegguid 6 ปีที่แล้ว

    Merry new year!

  • @kar27k
    @kar27k 6 ปีที่แล้ว +42

    "Wierd sintax"... Just say that they are just mini functions, and even why you use them? Can't you just directly attach event to function without anonymous functions? Just make function parameters compatible: Shoot(Context ctx); Move(Context ctx). Fully explain things or don't use them as this could cause miss undersuandings.
    Also code vise Love new input system and video is very in-depth how to set it up.

    • @DLCSpider
      @DLCSpider 6 ปีที่แล้ว +3

      He really should’ve explained that events take methods and _then_ that there’s a different syntax to write the exact same thing. On the other hand, I like that he brought them up because I personally have grown so much to lambdas that I ditched C# in favor of F# wherever I can.

    • @Sylfa
      @Sylfa 6 ปีที่แล้ว +16

      No need to call them "weird syntax" *OR* "mini functions", they have a name: "Lambda"
      With the name you can google how they work, without it your stuck trying to search for "=>" and failing to find anything

    • @RebelKeithy
      @RebelKeithy 5 ปีที่แล้ว +1

      Not having to pass the context to the shoot function means you can use it in places other than the input system. You could have an intermediate function, though if you wanted to not use lambdas.

  • @djrios06
    @djrios06 6 ปีที่แล้ว +2

    For the FPS can you teach us how to create an inventory and a hotbar???

  • @CurtisJensenGames
    @CurtisJensenGames 5 ปีที่แล้ว

    Around 11:49 I'm trying to play the scene but I get the "error CS0246: The type or namespace name 'InputMaster' could not be found (are you missing a using directive or an assembly reference?)" Even though I typed "using UnityEngine.Experimental.Input;" at the top and instantiated "public InputMaster controls;" with the rest of my variables. Can anyone help?

    • @agentplayz5438
      @agentplayz5438 5 ปีที่แล้ว

      I am having the same issue.

    • @agentplayz5438
      @agentplayz5438 5 ปีที่แล้ว

      Fixed. Did you do 11:49

    • @CurtisJensenGames
      @CurtisJensenGames 5 ปีที่แล้ว

      @AgentPlayz
      Unfortunately the field for that public variable did not even show up because my script did not compile. Did you have the exact same error code?

    • @lewisbailey1000
      @lewisbailey1000 5 ปีที่แล้ว

      AgentPlayz I don’t have that slot to drag it into, even tho in my script it’s set to public.

  • @stephanebessette6471
    @stephanebessette6471 3 ปีที่แล้ว +1

    New Unity version requires that we instantiate the class in Awake() i.e. controls = new InputMaster();

  • @CnekYT
    @CnekYT 5 ปีที่แล้ว +2

    As of right now, it's different and that there is no Input Manager. Can you please make an updated one, thank you.

  • @alankarmisra
    @alankarmisra 4 ปีที่แล้ว

    To those coming here in 2020 and using the non-preview 1.0 version, they've added new classes like "Player Input" to make this even simpler. Have a look at:
    docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/QuickStartGuide.html
    docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Actions.html#creating-actions

  • @mikemg4554
    @mikemg4554 6 ปีที่แล้ว

    That new system is wonderful! :O

  • @FowlArtemis2nd
    @FowlArtemis2nd 6 ปีที่แล้ว +3

    Can you provide a tutorial for multiple controllers (for a co-op game, for instance)?

    • @sky_guy1274
      @sky_guy1274 5 ปีที่แล้ว

      FowlArtemis2nd try creating an action map foreach character in your game maybe thats gonna work

  • @Szwejk92
    @Szwejk92 6 ปีที่แล้ว

    I'd love it if you would make a separate series reviewing Unity assets/tools (mostly technical stuff) from their Asset Store..

  • @AustinAwsome
    @AustinAwsome 5 ปีที่แล้ว +2

    From what I can tell in Unity 2019.1.8 onwards you don't need "using UnityEngine.Experimental.Input" to use the Input System.

  • @smitasushilbhegde3655
    @smitasushilbhegde3655 2 ปีที่แล้ว

    while downloading the asset be sure to close Visual studio or monodevelop

  • @mr.nutmeg5429
    @mr.nutmeg5429 3 ปีที่แล้ว +2

    The office is a turning point for vpns everyone says that thats their favorite part of them

  • @desmondmies3095
    @desmondmies3095 4 ปีที่แล้ว

    Well i've finally got a fully working Rebindable Input System with the new input system, that works QWERTY and AZERTY, finally !

  • @lewisbailey1000
    @lewisbailey1000 5 ปีที่แล้ว +4

    I followed the tutorial on how to add the new movement system, but I don’t seem to get the option to add the inputmaster to the script, I set it to public but when it compiles I see the script is on the player, but I have nowhere to add the input master script that was generated by the new input system, please can you help?

    • @cbox_
      @cbox_ 5 ปีที่แล้ว +2

      I ran in to the same issue. I fixed it by just going controls = new InputMaster(); in the awake method. No need to drag a reference.

  • @gaara.1t
    @gaara.1t 6 ปีที่แล้ว +2

    Please Can you make a video to continue your old 2017 project into new unity without errors

  • @Algost_
    @Algost_ 6 ปีที่แล้ว +4

    We still don't know if in the future we will be able to do combo keybinding, for exemple call Shoot() when i press "ctrl+h" on my keyboard.
    People want to have combo in theirs games Unity.

    • @Dxpress_
      @Dxpress_ 6 ปีที่แล้ว +3

      I haven't tried doing this, but it seems like it's already possible. Something like this should work:
      void Update() {
      if(Input.GetKey(KeyCode.LeftControl)) {
      if(Input.GetKey(KeyCode.H)) {
      //Shoot
      }
      }
      }

    • @wokarol
      @wokarol 6 ปีที่แล้ว

      I've heard something about combos, but I don't think they have solution for this. You should try looking on github.

    • @phobos2077_
      @phobos2077_ 6 ปีที่แล้ว

      Combos are super easy to do with UniRx, just convert your input signals into IObservable and describe your combos using reactive operators.

  • @marbletoons5618
    @marbletoons5618 6 ปีที่แล้ว

    This is some good stuff brah

  • @reginthesmith
    @reginthesmith 4 ปีที่แล้ว +1

    I tried doing this 15:29 but with gamepad and it gave me an error

  • @clydemarindo3177
    @clydemarindo3177 6 ปีที่แล้ว +2

    Brackeys can you do a random dungeon tutorial like Enter the gungeon, that would be very awesome

    • @starsquad9814
      @starsquad9814 4 ปีที่แล้ว

      Here is a video on an updated version of the new input system. Which is like Enter the gungeon. th-cam.com/video/H2RLv0aWUB0/w-d-xo.html

  • @MrAlbytheworm
    @MrAlbytheworm 4 ปีที่แล้ว

    Thanks for the tutorial. Any chance on making a tutorial for mobile using virtual joystick or touch with the new input system