How to use Unity's New INPUT System EASILY

Поделиться
HTML-код
  • Опубликовано: 18 дек 2024

Комментарии • 281

  • @rohangaikwad1
    @rohangaikwad1 3 года назад +159

    1:48 Correction: you can use either one or both input systems (old and new) together if you want to. To choose from which input system to use, go to Edit -> Project Settings -> Player -> Other settings -> Configuration -> Active Input Handling. From the drop-down, either select new or old or both.

    • @BMoDev
      @BMoDev  3 года назад +28

      Good call!

    • @superjoeprime
      @superjoeprime 2 года назад

      doesn't work for me

    • @oFurabio
      @oFurabio 2 года назад +23

      I KNOW THIS IS OLD, BUT I'M DOING A COLLEGE PROJECT THAT'S DUE IN 2 DAYS, I SWITCHED TO THE NEW INPUT SYSTEM AND HAD 0 IDEA OF HOW TO USE IT AND THOUGHT THAT I WAS GOING TO GO NO SLEEP FOR 2 DAYS TRYING TO LEARN IT BECAUSE I THOUGHT THAT WAS NO WAY OF RETURNING TO THE OLD ONE. I LOVE YOU, CAN I GIVE U A HUG?!

    • @TrickyMickTrucking
      @TrickyMickTrucking Год назад +4

      YOU ARE A LEGEND FOR THIS!!!!

    • @igorpolotai
      @igorpolotai Год назад

      OMG THANK YOU!!!!

  • @teckdomain5847
    @teckdomain5847 2 года назад +12

    Using Unities Input System Method #1: 1:13 --- 6:09
    Using Unities Input System Method #2: 6:09 --- 9:31
    This is for the people that already watch the video
    but need to go back to one of the methods. If you
    need more context, then just watch the full video.

  • @tdm.gamedev
    @tdm.gamedev 2 года назад +71

    As far as I can tell, this is the best input system tutorial on the internet. I can't tell you how many videos I've watched, and how many guides I've read, and I didn't know about the "Create Actions" button OR the Generate C# class checkbox. Thank you so much for this video.

    • @BMoDev
      @BMoDev  2 года назад +8

      Appreciate that, hope it helps!

  • @Firehawk4000
    @Firehawk4000 Год назад +65

    I spent the last 3 days watching different hour-long tutorials that went incredibly in-depth and had me writing 30-ish lines of code, and here you were the whole time with "Unity already does this for you."
    Thank you.

    • @Kooczsi
      @Kooczsi 10 месяцев назад +4

      i hate those tutorials that go way too in-depth for a simple problem with a simple solution. Spending an hour writing code that already exists doesnt make you smart.

    • @Aguyfrom225
      @Aguyfrom225 9 месяцев назад +1

      Im here because none of those other tutorials worked for me.

  • @gadgetboyplaysmc
    @gadgetboyplaysmc 3 года назад +94

    Lmao I never knew people could actually make short bite-sized tutorials and still have so much value. Jeez man, you raised my standards. Keep it up!

    • @BMoDev
      @BMoDev  3 года назад +7

      Appreciate that 🙏

    • @Andrew90046zero
      @Andrew90046zero 2 года назад +2

      @@BMoDev Do you end up cutting out a lot of "digressions"? Like if you want to get your video under a certain time, do you usually end up cutting out a lot of what you said in the recordings? So you can be concise and to-the-point with your videos.
      If so, how much is cut out? Like if it wasn't cut out, would the video be 20 minutes long instead?
      I ask because I also think you did a good job at packing a lot of info into 10 minutes. And I wish I could do the same :P

    • @BMoDev
      @BMoDev  2 года назад +7

      @@Andrew90046zero I keep probably 95% of what I record, I just trim whenever theres a long gap between 1 sentence to the next..
      Every video I try to get better at doing it in 1 take so I can edit faster haha

    • @Andrew90046zero
      @Andrew90046zero 2 года назад +2

      @@BMoDev Totally agree with that last bit. I want to be able to make simple and straightforward tutorials about topics that I don't see being talked about too much already on youtube, or add a new perspective to a common topic.
      But I don't want to overwhelm viewers with extra unnecesary info.

  • @Neurobots
    @Neurobots 2 года назад +13

    Migrating from the old system was a many days gaddamn nightmare! So. Just pay clear attention, follow the instructions and even rewind, you can then experiment with other settings gradually. Don't confuse yourself with other tutorials, despite the quicker diction, this is the best of the best starting point for newbies with this new beast. Many thanks to the author!

    • @FictitiousCtrlGames
      @FictitiousCtrlGames Год назад +2

      Can you tell me what some of the problems are with using the default input system?

    • @guineagames1048
      @guineagames1048 Год назад

      @@FictitiousCtrlGames Sorry for the late reply, for singleplayer I don't see any issues, but for multiplayer I can confirm setting up more than 2 players is a PAIN in the old one.

  • @jmw03j
    @jmw03j 2 года назад +7

    Just wanted to agree that this is the most concise and impactful video I've seen on this. Watched 6 or 7 others and even if they were 30m+ long they didn't provide as much true value as this one. Really solid work.

  • @LemonHeadYouTube
    @LemonHeadYouTube 2 года назад +4

    I watched and read at least 3 or 4 different tutorials on the new Input System, even Brackeys video. Yours explained it the best, as well as giving many other different ways of going about it. You kept it simple and to the point, Subbed!

  • @wmka
    @wmka 2 года назад +2

    Searched for "unity input system".
    This is first on the list.
    Thank you and have a good one.

  • @amyblack3164
    @amyblack3164 2 года назад +4

    I was having such a hard time with this because of different videos using different techniques and assuming I knew some things I didn't! This video was great, thank you so much!

  • @AmfistomosAtlas
    @AmfistomosAtlas Месяц назад

    I have always postponed the task of switching to the new input system for my new and on-going projects, because I was well accustomed to the old ways. Never touch a running system, ey? Well, after watching this, I did change a running system and the transition went smoothly. And after the switch I have been asking myself, why didn't I do it sooner! Thanks mate!

  • @leonard4
    @leonard4 Год назад +4

    Would love to see a tutorial from you on a rebinding system for the new input system, this video was a life saver!

  • @xXYannuschXx
    @xXYannuschXx Год назад +2

    You explained this way way way better and simpler than Unity's own tutorial and documentation. Unity says that there is now way to 1:1 implement reading axis like with the old input system, having you require to use callback when triggering the input action event.
    But you clearly show that there is a 1:1 solution....

  • @venomtailOG
    @venomtailOG Год назад +9

    I don't want a simpler way of doing this. I want to use the action maps. Why isn't there a normal tutorial that does this. Everyone always the easiest path of least resistance tutorials without teaching us how to actually use the tools given.

  • @shackattack5018
    @shackattack5018 2 года назад +3

    Just have to say this has to be one of the best and simplest explanations of the new system, you did the community a great service. I'm now subscribed!

  • @jamescarlson
    @jamescarlson Год назад +1

    Hey Brendan! We went to school together; fancy running into you here! I didn't even know Unity had this new input system until I needed it today, so thank you for the great tutorial! Hope you are well!

    • @BMoDev
      @BMoDev  Год назад

      Hey haha, awesome seeing a comment from you! Yeah the input system is kinda wonky honestly and has a learning curve, but gets pretty handy once you figure it out. Same back to you, hope all is well!

  • @Mackinstyle
    @Mackinstyle 2 года назад +2

    In my opinion, one of the best things about this tutorial is that you take the time to talk about the little roadblocks like "why can't I see this plugin listed?" or "Why is autocomplete not working for Input in my code editor?"

  • @Gyozamang
    @Gyozamang Год назад

    this is the most convoluted way for the new input system Ive seen from multiple tutorials

  • @LaughingMan44
    @LaughingMan44 3 года назад +28

    That's way more complicated for someone starting out than the old way. A lot of arbitrary boiler plate code

    • @BMoDev
      @BMoDev  3 года назад +12

      Yeah you're absolutely right, its got a good chunk of overhead pains... but once its setup it can keep your code pretty clean. I still use the old system for most of my projects, but if I was making a commercial game I'd use the new system , personally.

    • @Andredy89
      @Andredy89 3 года назад +6

      Exactly. I'm creating my first _big_ game and after one sleepless night I decided to stick with the old input system.

    • @tramarthomas6105
      @tramarthomas6105 Год назад

      ​@@Andredy89 how your project has been going well

  • @raydelto
    @raydelto 6 месяцев назад

    Smooth ending! Thanks for this awesome content.

  • @dlgcreations2162
    @dlgcreations2162 2 года назад

    After watching what I thought was how to use the new system and getting rather upset that everything stopped working, I came across your video and in less than 10 minutes you clarified (simply) the error of my ways. Thanks !!

  • @DataDrifterOFC
    @DataDrifterOFC 2 года назад +19

    This is short but in many ways more informative than many tutorials on the subject that go through all types of ways to use them, then explain why not to use them, only to then graze the preferred method.
    Thank you, this was extremely helpful!

  • @akidama
    @akidama 3 года назад +1

    I literally started exploring the new system last night and was hoping you'd post something. I feel like I manifested this video with my powerful psychic energy.

    • @BMoDev
      @BMoDev  3 года назад +1

      I sensed something was wrong

  • @TegridyMadeGames
    @TegridyMadeGames 2 года назад +1

    YOU ARE THE BEST!

  • @stuff3862
    @stuff3862 Год назад +2

    Thanks unity for making something simple far more complicated.

  • @giovani74
    @giovani74 5 месяцев назад

    Your video is so helpful and easy to understand. I like how direct you are. Cheers

  • @BoryslavMalishevskyi-j2x
    @BoryslavMalishevskyi-j2x 6 месяцев назад

    Great video:) simple, short and easy to understand, well done!

  • @thismakesnosense
    @thismakesnosense Год назад

    I spent hours trying to figure this stuff out and your tutorial just does it with a couple of lines

  • @stelbertstylton
    @stelbertstylton Год назад +1

    Thank you very much! This helps a lot!

  • @Din_e_Islaam
    @Din_e_Islaam 2 года назад

    Woah, great video mate!

  • @tottijoao
    @tottijoao 2 года назад

    Thank you! I watched like over 9000 videos and just couldn't figure it out but you made it simple and effective!

  • @JustHaltGaming
    @JustHaltGaming 9 месяцев назад

    THANKYOUTHANKYOUTHANKYOOOUUU Only person in this jungle of convoluted tutorials that explained it :')

  • @renosnicolaou8417
    @renosnicolaou8417 Год назад

    this is what I looked for to understand. Thanks bro

  • @SudopiaGames
    @SudopiaGames Год назад +1

    Perfect, love your implementation. Thank you.

  • @eileeng2492
    @eileeng2492 3 года назад +1

    Wow exceptional video BMO!
    Excellent

    • @BMoDev
      @BMoDev  3 года назад

      appreciate it!

  • @ShellSharpInc.
    @ShellSharpInc. 11 месяцев назад

    Thank you for this, every other video I found made everything seem overly complicated just to detect input.

  • @monkeytheory4718
    @monkeytheory4718 2 года назад

    ok, I have watched multiple input action videos and this is the one I was able to understand

  • @belegrade
    @belegrade 8 месяцев назад

    Still the best input system tutorial on youtube

  • @mandamoon9149
    @mandamoon9149 3 года назад +4

    This vid is swag daddy, sheeshhh

  • @bluezamx814
    @bluezamx814 5 месяцев назад

    This video is amazing, thank you so much!

  • @requiem9167
    @requiem9167 Год назад

    This is great. Straight forward and what I wanted to see

  • @petermoss7387
    @petermoss7387 2 года назад +1

    Woah clicking the subscribed button worked! I’ll be using the generate script version from now on ty

  • @AmazinglyStrangeMedia
    @AmazinglyStrangeMedia Год назад

    Simple and Brilliant, Loved this video!

  • @GrowthFuelTV
    @GrowthFuelTV 2 года назад

    Maybe the best tutorial above the imput system, easy to understand, thanks matte, and i have subs the channel because that end line on the video :D

  • @MishimaFanatic
    @MishimaFanatic Год назад

    Thank you, one of the best videos on how to implement the NIS, help me a lot with a homework

  • @MaximilianPs
    @MaximilianPs 7 месяцев назад

    I'm in late but that's a great tutorial and I hope you don't stop doing it 😁

  • @strategystuff5080
    @strategystuff5080 7 месяцев назад

    Thanks man, I used the new input system before, but forgot most of it. It is so hidden (like many useful things in unity)
    It is really nice to use, well worth it (also Unities own documentation is awful for most things, they could have explained everything in a few paragraphs but instead they are like "download our example lol")

  • @Stompin40
    @Stompin40 3 года назад +2

    This was really really helpful. Thank you!

  • @Norbingel
    @Norbingel 2 года назад

    That last tip blew my mind!

  • @studiovulcan4411
    @studiovulcan4411 2 года назад +1

    I wish the parts where you "updated" the code were redone so I could understand what was going on. As someone starting fresh, i didn't have this code to "update" ssooooo, it made it harder to follow along than it needed to be. :P

  • @saffronomicon
    @saffronomicon 2 года назад

    Just what I needed to continue, good examples and short thx!

  • @Radek_M.
    @Radek_M. 2 года назад +1

    Very helpful video :)

  • @filipexavier8750
    @filipexavier8750 Год назад

    How do I make it so that when I click play the Play mode window expands and the console appears in the corner at 9:02 in the video?

  • @lemuelmetrillo271
    @lemuelmetrillo271 2 года назад

    ITS REALLY WORKED LOL THANK YOU DUDE

  • @michellecristianedeazevedo2852
    @michellecristianedeazevedo2852 2 года назад

    Thank you for sharing this tutorial

  • @GameOver71910
    @GameOver71910 Год назад

    Thanks dude this was driving me up the wall

  • @catmeddie7118
    @catmeddie7118 Месяц назад

    You absolutly safed me

  • @PaziaTV
    @PaziaTV 2 года назад

    Great video, thanks!

  • @boomerangaming
    @boomerangaming 2 года назад

    Thank you so much for letting me know to generate csproj file for new input system.

  • @GeenSama
    @GeenSama 9 месяцев назад

    I like the first part most :) thanks

  • @hasanduman8559
    @hasanduman8559 2 года назад

    Tysm, did everything as described

  • @Feiee
    @Feiee Год назад

    Can you explain about the mobile movement. So we can use button in order to move.

  • @cihadturhan
    @cihadturhan Год назад +1

    Thanks for sharing. Although you explained it short and understandable manner, new input system is way more complicated and I’m afraid to make transition to new system.
    Just a simple tip: instead of enabling/disabling, you can make gameobjects to child to other gameobjects so it will be disabled automatically

  • @ars-1
    @ars-1 Год назад

    I like the last part where we keep clicking and subscribe your channel

  • @JM-go6zx
    @JM-go6zx Год назад

    Thank you for your video. It has been very helpful for me to understand this system ✌

  • @univexnate8013
    @univexnate8013 8 месяцев назад

    Thanks for that video, tried to fixed a damn menu with it, and it works now XD

  • @TheSteveTheDragon
    @TheSteveTheDragon 3 года назад +7

    Admittedly it uses the advanced programming concepts of delegates and events but nothing a little practice can't fix.

    • @BMoDev
      @BMoDev  3 года назад +1

      no doubt

  • @tilenbicanic6172
    @tilenbicanic6172 Год назад

    This video was really helpful. Thx!

  • @dragonscalesvr
    @dragonscalesvr 2 года назад +1

    Is there a way to just work with the interface they provide or you actually have to go in and code it to use it?

  • @ndkhanhs_m01
    @ndkhanhs_m01 2 года назад

    i love u so much !! you helped me end 15 hours stress because of this

  • @brandonreames4121
    @brandonreames4121 Год назад

    Nice Video. What is the reason to add the OnDisable() section for the controls? Most of the videos I've seen just say you only need the OnEnable part and not also the disable. Curious if there's a particular case I haven't run into yet there.

  • @Un4GivNX
    @Un4GivNX Год назад

    I just wasted 3 days trying to use the new input system. I think it is going the right way but i stumbled on so many problems that i gave up and fallback on the good old reliable Rewired system. For 45$, it took me a day and everything is up and running.

  • @naejimba
    @naejimba Год назад

    8:56 So I've done this over and over up to this point, and I can't get it to work. I'm getting errors like:
    'PlayerMovement.Shot(InputAction.CallbackContext)' is a method, which is not valid in the given context
    Cannot assign to 'Shot' because it is a 'method group'
    the type 'PlayerMovement' already contrains a definition for 'Shot'
    Very few differences (obviously it is called 'Shot' instead of 'fire' for example) I will reply with what my code is after trying to add all of this in.

    • @naejimba
      @naejimba Год назад

      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      using UnityEngine.InputSystem;
      public class PlayerMovement : MonoBehaviour
      {
      private CustomInput input = null;
      private Vector2 moveVector = Vector2.zero;
      private Rigidbody2D rb = null;
      public float moveSpeed = 10f;
      public CustomInput playerControls;
      private InputAction Movement;
      private InputAction Shot;
      private InputAction Laser;
      private InputAction Bomb;
      private void Awake()
      {
      input = new CustomInput();
      rb = GetComponent();
      }
      private void OnEnable()
      {
      input.Enable();
      input.Player.Movement.performed += OnMovementPerformed;
      input.Player.Movement.canceled += OnMovementCancelled;
      Shot = playerControls.Player.Shot;
      Shot.Enable();
      Shot.performed += Shot;
      }
      private void OnDisable()
      {
      input.Disable();
      input.Player.Movement.performed -= OnMovementPerformed;
      input.Player.Movement.canceled -= OnMovementCancelled;
      Shot.Disable();
      }
      private void FixedUpdate()
      {
      rb.velocity = moveVector * moveSpeed;
      }
      private void OnMovementPerformed(InputAction.CallbackContext value)
      {
      moveVector = value.ReadValue();
      }
      private void OnMovementCancelled(InputAction.CallbackContext value)
      {
      moveVector = Vector2.zero;
      }
      private void Shot(InputAction.CallbackContext context)
      {
      Debug.Log("We fired");
      }
      }

  • @ericzwirnmann8151
    @ericzwirnmann8151 11 месяцев назад

    Thanks, the Input System is much easier to understand now. Just need to work on the gritty details on how to setup and use the Input Actions (dialog)

    • @BMoDev
      @BMoDev  10 месяцев назад

      Definitely takes some getting used to!

  • @사이버망령-t4b
    @사이버망령-t4b 2 года назад

    It's best inputSystem tutorial for beginner.. so helpful Thanks a lot!!

  • @butterccm
    @butterccm Месяц назад

    Can you show this in a multiplayer context? I am trying to make a local multiplayer game and I followed this, when I add another controller/player they both are controlled together even though the input system is saying theres a user 1 and 2.

  • @jeffersongouveia4581
    @jeffersongouveia4581 2 года назад +10

    Very good tutorial man! Simple and straight to the point! Thank you! Subscribed! 🙂

    • @BMoDev
      @BMoDev  2 года назад +1

      Thanks, appreciate it!

  • @nsr43d
    @nsr43d Год назад

    You are highly technical. Very nicely explain. Great! tutorial i found🙂 Thank you!!

  • @elsyndur4415
    @elsyndur4415 2 года назад +2

    Do you know why it's telling me, "The type or namespace name 'PlayerInputActions' could not be found," even though I generated the C# class? Generating the class solved this issue for me once before, but, now, it won't, for some reason.

    • @aw1lt
      @aw1lt 2 года назад

      make sure you pressed apply.

  • @Soturi_the_paladin
    @Soturi_the_paladin 2 года назад

    i subbed because of the clicking joke at the end. that was pretty funny

  • @tPlayerioT
    @tPlayerioT Год назад

    what theme are you using? it looks so good to my eyes

  • @atexomg
    @atexomg 2 года назад

    Thanks bro you are the only one that I found helpful

  • @平震宇
    @平震宇 2 года назад

    Great video, the menu works great

  • @InverseMatt
    @InverseMatt 2 года назад

    I had to try this new thing called clicking on subscribe button, and it worked

  • @smitj5404
    @smitj5404 2 года назад

    much love to your work sir!!! ❤❤❤

  • @Fizzpop.
    @Fizzpop. 2 года назад +1

    Great tutorial. I have been trying to recreate and I seem to have everything working except for the portal texture. My portals remain solid colors. At runtime, I have checked that each portal has a "RecursivePortalMask" instance as their material, and the portal camera position appears to be correct. Any ideas what might be the culprit?

    • @Fizzpop.
      @Fizzpop. 2 года назад +1

      update: the mesh filter was set to the wrong 'circle'. Therefore the renderer had nothing to render onto lol

  • @jakeduncan2721
    @jakeduncan2721 3 года назад +2

    Hi, do you have a moment to talk about our lord and savior BMo?
    -
    -
    -
    All hail BMo
    -
    -
    -
    Great to see another tutorial for the people, well done!

  • @vincenzusgaming
    @vincenzusgaming 2 года назад

    This is WAYYY better than the one Unity has in their channel! Its very simple and easy to learn!

  • @MilesIveson
    @MilesIveson 2 месяца назад

    You are an absolute lifesaver! I have been looking everywhere for a simple tutorial on this, and all the others were so complicated, and this was easy. Thank you.

  • @gazuloo6395
    @gazuloo6395 2 года назад

    This is really useful and easy to understand!

  • @2401M3NDIC4N7BI45
    @2401M3NDIC4N7BI45 2 года назад

    slick call to subscribe, you earned it

  • @MattRaffel
    @MattRaffel 2 года назад

    Also, wanted to say thank you for a to the point, quick tutorial.

  • @Scobbo
    @Scobbo 2 года назад

    In regards to the OnEnable and OnDisable events, you are assigning the action map Player.Move to the variable move inside the event. Could that cause an issue with the on disable event if the enable isn't called? or if enable gets called twice? Just curious because I have no idea.

  • @MrQwerty2524
    @MrQwerty2524 Год назад

    Using Unity 2021.3, the Input Actions script was not generated properly. The JSON was empty. I could not get it to generate properly until I ticket the Auto-Save in the Input Action window.

  • @metapod
    @metapod 2 года назад +1

    If I want to make a lot of controls that are like "If X button is held while Y is pressed" and "If Z is pressed but Q is not held" is it better to use the old input system since it lends itself to if statements more naturally? Or should I still aim to use the new system?

    • @dumonyu5027
      @dumonyu5027 2 года назад

      I'm a noob still but I think the new system would be better for that case. There are "button press with single modifier" and "button press with two modifiers" options built into bindings. Someone more experienced may be able to chime in and clarify tho.

  • @luckypretzel
    @luckypretzel 2 года назад

    Quite a good tutorial. Thank you.

  • @cavemohn3080
    @cavemohn3080 2 года назад

    i already have the newest unity engine input system but whenever i try and open a c# script it just goes to notes and the script written down there

  • @madpenguin58
    @madpenguin58 3 года назад +5

    First View! First Comment! Love your videos!

    • @BMoDev
      @BMoDev  3 года назад

      Appreciate ya 🙏

  • @Megabyte1
    @Megabyte1 Год назад

    Thank you!

  • @TexturedPolak
    @TexturedPolak 2 года назад

    Very nice tutorial and easy :)