How to use Unity's Input System

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • How to use the new input system in Unity! I go over installing the package, the different ways to use the input system, and the recommended way!
    ᐅGet the full Source Code Bundle to my Unity Tutorials 🤓
    sam-yam.itch.io/samyam-full-s...
    📥 Get the Source Code 📥
    / 55295489
    ►🤝 Support Me 🤝
    Patreon: / samyg
    Donate: ko-fi.com/samyam
    🔗 Relevant Video Links 🔗
    ᐅALL of my Input System videos
    • Unity's NEW Input System
    ᐅInput System Documentation
    docs.unity3d.com/Packages/com...
    ᐅInput System Changelog (features and fixes in different versions)
    docs.unity3d.com/Packages/com...
    ᐅMigrate From Old Input System
    docs.unity3d.com/Packages/com...
    ᐅUnsubscribe Lambda Event Handler Stack Overflow Discussion
    stackoverflow.com/questions/1...
    This video goes over installing the Input System via Unity's Package Manager, creating an Input Action Asset and assigning an action map, making several actions of different Action Types and assigning multiple bindings to each, mentioning Interactions, Processors, and Control Schemes available, Generating a C# class from the Input Action Asset and referencing it in code, subscribing to the different events that the actions send (started, performed, cancelled), getting the values from the actions directly, using the PlayerInput component to get the values instead (lots of nice helper functions here), assigning an InputAction through the Inspector along with getting a reference to an existing action through an InputActionReference (you can also reference a map!), creating actions dynamically through code, using the Input Debugger to see your actions at runtime, and going over the Migrate from Old Input System guide that Unity posted.
    Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we have recommended. While clicking these links won't cost you any money, they will help me fund my development projects while recommending great assets!
    😎 Cool Unity Assets 😎
    ᐅPeek - Editor Toolkit: assetstore.unity.com/packages...
    ᐅEditor Console Pro: assetstore.unity.com/packages...
    ᐅRainbow Folders 2: assetstore.unity.com/packages...
    ►⏱️ Timestamps ⏱️
    0:00 Install
    1:18 Intro
    1:51 Input Action Asset
    3:57 Value vs Passthrough
    4:20 Assign Binding to Action
    4:40 Input System Events (Started, Performed, Canceled)
    5:16 Multiple Bindings to Action
    5:43 2D Vector Composite
    7:42 Interactions
    8:34 Processors
    8:57 Modifiers
    9:17 Control Schemes
    10:12 Generate C# Script Overview
    11:48 Generate C# Script Usage
    18:30 PlayerInput Component
    23:24 Event Lambdas
    24:39 Enable UI for the Input System
    24:54 Input Debugger Short Preview
    25:08 Migrate From Old Input System
    26:29 InputAction & InputActionReference
    27:30 Dynamic InputActions through Code
    30:30 Outro
    💖💖THANK YOU TO ALL MY PATRONS 💖💖
    ❯❯❯ My Links ❮❮❮
    💗 Patreon 💗
    / samyg
    💬 Discord Server 💬
    / discord
    🐦 Twitter 🐦
    / samyam_utube
    📚 Facebook 📚
    / samyam.youtube
    🎵 Music 🎵
    Fretless by Kevin MacLeod
    Link: incompetech.filmmusic.io/song...
    License: creativecommons.org/licenses/b...
    👍 Like and Subscribe! 👍
    🖥️ Computer Setup 🖥️
    *As an Amazon Associate I earn from qualifying purchases.
    www.amazon.com/shop/samyam
    #unity3d #unitytutorial #unity2021
  • Навчання та стиль

КОМЕНТАРІ • 261

  • @Dailyfiver
    @Dailyfiver 2 роки тому +125

    Seriously these input tutorials are the highest quality I have seen on youtube. Blowing my mind with how clear everything is to me now!

    • @samyam
      @samyam  2 роки тому +9

      Thanks again 😆

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

      I share the same opinion and I've watched 300+ tutorials

  • @alexleonardkrea
    @alexleonardkrea Рік тому +7

    I have seen a lot of input system tutorials but this tutorial is by far the best overview I have seen. You did a really good job showing all the options available and laid out your opinions very well on each of them.
    Thank you for putting in the time to make this! It will be my new go-to-video suggestion for people learning the new input system.

  • @maazadnan8550
    @maazadnan8550 2 роки тому +15

    I would like to tell you that these are amazing, while almost every other youtuber simply goes through the process of setting it up and using different unity components, you actually explain them and the logic behind each and every thing, thank you!

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

      Thanks! 😁

  • @gilireeves4956
    @gilireeves4956 Рік тому +1

    This video is so good! You explain the system so well and go over everything important, but you don't overexplain. I keep coming back to the video every time I need to set an input system for a game to remind myself how to do it and it always clears up everything.

  • @ultimatesin3544
    @ultimatesin3544 2 роки тому +18

    I gotta say, thank you so much for your indepth tutorial that covers all avenues of implementation instead of the typical narrow "quickest route".. so nice to finally see a unity dev who understands SOLID and access modifiers and why public methods should be minimized. Coming from other platforms I'm kinda surprised the lack of comprehensive docs for alot of Unity stuff, anyway your tutorials are great!

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

      Thanks! Glad you found it useful! :)

    • @abdoreda7126
      @abdoreda7126 8 місяців тому

      Exactly! you took the words right out of my mouth!

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

    I've been confused in adapting new Input system since I'm a beginner in Unity, but this video helped me so much. Thanks a lot!

  • @EfrainJMDev
    @EfrainJMDev Рік тому +1

    I have given a chance to the new input system multiple times but I always rejected it because other tutorials made it look very complicated, I'm finally using it thanks to you!

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

    thank you for this. ive watched other input system explanations but they often dont go over the full options of implementation (im taught how to use component but not how to get constant values from it directly) and so i was left using a weird combination of the generated class and the component since i was only shown a how to do certain things using certain ways.
    Also i appreciate explaining that one can make input action variable to avoid typing strings constantly and risking mistyping. Now I know to look for ways to avoid that not just with this, but with all my code.
    great tutorial overall and very well organized and explained.

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

    a very good tutorial. I'm learning Input System for VR and you made this so clear

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

    Took so long for me to find a video that made sense, thank you!

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

    The bit near the end about InputAction & InputActionReference is the interesting part :D.. I can see this integrating into many scenarios well. Thanks for the video

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

    This was incredible thank you so much with your help I was able to overcome a problem that I had been stuck on for 3 days, and I really struggled elsewhere and with the documentation as well, thank you so much!!!

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

      Glad to hear!! 😁

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

    Great video!
    The one thing that makes Control Scheme such a great part of the Input System is its implemented listening & switch option.
    Let's say that you want to allow the player to use either a Mouse and/or just a Keyboard or a Controller. Obviously, the kind of inputs will varies where one scheme might requires a press of a button to initiate the use of another input and so on so, originally, you mostly had to add some sort of full-time listener to any action of any device "not in use" so that you can apply some kind of switch as to what the player uses in case he or she decide to change which control to use mid-game.
    For example, let's say that you have a zoom function in a isometric-viewer Action RPG that allows the player to zoom in and out. On Mouse & Keyboard, simply scrolling the mouse wheel does the trick and, in case someone prefer to player using only a keyboard, it's fairly simple to add additional binding to some Numpad keys. But what about the controller? What if, to zoom in and out, the player has to toggle the zoom-in-out prior and after zooming with something like the right stick as, otherwise, the left stick is used to aiming?
    This is where the Input System does a really good job because its gives many ways of "knowing" and handling what is going on instead of just attempting at reading every small possibilities out of the players' reach.

  • @tobias-stein
    @tobias-stein 2 роки тому

    Very smooth to digest your input, thanks for the content :)

  • @Jumph96
    @Jumph96 11 місяців тому

    Thanks so much for making this video, I've heard about this new Input system but was hesitant to jump to it as I'm already struggling with lots of other parts of the game I'm making, but you've helped me understand why and how it can help me down the line especially when it comes to allowing the player to rebing actions. Once again, thank you so much for also going really in depth and show us all the different ways you can use/create an Input Action asset 👍. You just gained a new Subscriber 😃

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

    This is very useful even for VR, the XR Interactive Toolkit takes a very similar approach as the Input System(I just looked up: the XR Interactive Toolkit depend on the Input System), all the knowledge fits nicely in VR, the action based controller, input action, binding, several different ways to get the user input in code. Appreciate your sharing. Thanks.

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

    Incredible tutorial! You are an amazing teacher, thank you so much!

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

    The most comprehensive tutorial on the "New" Input system. Thanks.

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

      Yay! Thanks 😁

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

    consistently clear and helpful videos, thanks so much!

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

    Thats the way of showing how to use something good job ! Loved it

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

    Thank you so much for all these tutorials bro. So much valuable knowledge

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

    this is the best tutorial to know everything with new input system, thank you so much for creating such wonderful tutorial

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

    Happened to stumble on this video, going through checking out to resolve an input error. This is a very informative video, really clear and I will definitely be coming back when I need to set up input. I subbed because of this. Thanks for the video : ]

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

      Thanks so much!

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

    Great tutorial, covered everything i needed and more! Also i like the way you say 'buddons'.

  • @facejets
    @facejets 2 роки тому +11

    I often get a lot out of train-of-thought type of follow-along stuff in unity, but I'm six minutes in and subscribed, and a little bit excited. It's not just the organization; your voice carries my attention, which I really need for topics like this

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

      Thanks so much! Very glad you enjoyed the video, lots more on the channel and coming up! :D

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

      @@samyam I just want to second this. So many youtube tutorials are all over the place but you really went step by step. This video was a godsend. Subbed.

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

      So happy to hear thank you!! 😄

  • @filipezanella825
    @filipezanella825 3 місяці тому

    I confess I'm impressed. this video is great and explain everything really well.

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

    Best video about the input system I found do far! Well done!

  • @parcell-komunika3069
    @parcell-komunika3069 Рік тому

    Ima download it thanks for sharing!!

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

    Unbelievably helpful as always!

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

    This is a great tutorial! Very helpful, Thank You!

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

    This saved me a lot of time and many cups of coffee

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

    It worked. Thanks a lot

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

    This is very very helpful. The new Input system felt needlessly complicated to me

  • @hubbubbobbin
    @hubbubbobbin 8 місяців тому

    Thank you for the video!

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

    This is great, thank you!

  • @abdoreda7126
    @abdoreda7126 8 місяців тому

    This is such a good video, thank you so much

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

    Thanks samyam :D

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

    Thanks samyam, for this excellent video :)

  • @6TDOW66
    @6TDOW66 Рік тому

    Lifesaver. Thank you!

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

    Great video full of information. Thank you!

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

    Awesome video, the input system has some great features but its presentation is very confusing, you've made it much easier to understand how it can be used, thanks!

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

      Glad you enjoyed the video!

  • @cade5792
    @cade5792 11 місяців тому

    Great tutorial!

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

    This is extremely helpful lol. I had seizure from TL;DR syndrome when I tried to go through the manual by myself. Thanks

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

    Excellent tutorial. Simple & informative. Well done :)

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

    god damn, thanks girl, this is the best tutorial out there

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

    Wonderful, thank you so much!

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

    Great tutorial, as always!

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

      Thanks! :)

  • @how-to-make-a-game
    @how-to-make-a-game 4 місяці тому

    WOW SUCH DETAILS AT SPECIFIC TOPIC , GREAAAAAAAAAAAAAAT!!

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

    Many thanks!! Now my player scripts are looking nice and tidy :D

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

    Thanks a lot ... it is helping in real time game dev...

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

    thank you very much you solved my problems

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

    Great tutoriel! Thanks

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

    This is really, really good god damned content 💪. Thanks for putting it together!

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

    You are good teacher for Unity engine

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

      Thank you :)

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

    immediate, easy, answer for something I was overcomplicating loads - Keyboard.current.etc.....subscribed :)

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

      Thanks! :)

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

    Gracias por compartir tus conocimientos 👌

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

    Thanks a lot!

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

    Life saver 💞 !

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

    You are the GOAT

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

    Thanks!

  • @Khaled_The-Nazi
    @Khaled_The-Nazi 2 роки тому +2

    Cool video it's fun i've watch it cuz it's fun for me at least
    and im gonna Watch it again :D

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

    Awesome video, best one on the topic i've seen, thank you
    Personally i prefer to use the input action references; my reasoning being that you shouldn't hardcode a string that can be easily changed by someone in the editor

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

      That's true, to each their own!

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

    Thank you !

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

    God, I'm glad I found your video that helped me

  • @-.._.-_...-_.._-..__..._.-.-.-
    @-.._.-_...-_.._-..__..._.-.-.- 2 роки тому +2

    Thank you so much! This is easily the most clear and concise tutorial out there.

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

      Thanks :)

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

    Thank you

  • @user-oh1eg9nz7c
    @user-oh1eg9nz7c Рік тому

    Вы прекрасны! Самый лучший урок!!!

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

    Many thanks broh

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

    Really great video, thank you ! +1 sub.

  • @ciixo8510
    @ciixo8510 2 роки тому +5

    Best channel on covering unity's input system! One question i had tho, how can we get a hold functions duration to use it on something like ui, the callbackcontext has a duration value but it doesn't seem to be registering correctly while holding down the key, it would be a great thing to cover on a seperate video!

    • @samyam
      @samyam  2 роки тому +5

      Thank you!! If you have an interaction you can get the completion percentage with action.GetTimeoutCompletionPercentage()
      already have a video on that ;)
      14:57
      ua-cam.com/video/rMlcwtoui4I/v-deo.html

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

    best video ever!

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

    your video is amazing thanks lady

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

    By far the best video on the "new" input system I have seen (and I have seen A LOT).
    Personally I would have preferred you to show your preferred option and not digress - save that for other videos - as now I need to watch again to remind myself!
    I'm going off now to watch your other videos - as I'm especially interested in cross-platform options (so touch for mobile vs keyboard and mouse for PC vs Controller for console, and how I can manage them all as simply as possible...

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

      my mind was blown away when i set up the new input system i moved my character with keyboard and mouse and then tried a ps4 controller it worked perfectly and in real time

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

      Thank you so much!!

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

      @@samyam I did go off and watch some of your other videos - and I'm overwhelmed!! the new input system is, I think, great, but I am still wrapping my head around it - your videos are helping immensely, but it's still taking me some time to work it all out!
      Without your videos, I would for sure have just given up by now.
      So thanks again!

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

      Glad to hear!! :)

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

    best tutorial doesn't exi---

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

    thanks :)

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

    keep it up ❤️

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

      Thank you!

  • @bernharddoesuxinmedtech6548
    @bernharddoesuxinmedtech6548 Рік тому +1

    Outstanding, I tried a different tutorial first, was still confused. Your's was exactly what I needed, many thanks. As soon as Patreon offers a reasonable way to create a receipt for the inputs, my company will join! And yes, I tried ko-fi, but PayPal didn't work 😞

    • @samyam
      @samyam  Рік тому +1

      Thank you so much I appreciate it!! I also have UA-cam memberships available, although the perks are a tad different than Patreon because I can’t redistribute files easily yet.

    • @bernharddoesuxinmedtech6548
      @bernharddoesuxinmedtech6548 Рік тому +1

      @@samyam Paypal worked this morning, so you should have received a few well deserved coffees via ko-fi 😀

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

    Excellent video. Awesome confusing bug I came across was that on input action asset that you can create from the player input component I couldn't see any input devices. For whatever reason it worked fine when I created my own control scheme, but not with the generated or "No Control Schemes". Seems to work fine in this video.

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

      Thanks! Sometimes the system can be a bit buggy, perhaps upgrading to a preview version may help with some of the bugs :)

  • @imnot_RAUL.28
    @imnot_RAUL.28 Рік тому

    Thank you for tNice tutorials, tNice tutorials was a huge help.

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

    UR GOOD!!!!! THANKS

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

    Very good tutorial! Thank you very much for the explanation of the new input system! For me personally the video had a bit too much content (luxury problem). I wanted to quickly understand the best practice on how to work with the new input system (which you explained). But instead of telling only the best way, then say good bye and refer to another video for more (unnecessary but interesting topics regarding the new input system), you mixed all into one video. Nevertheless you covered also the recommended way and thus its fine for me. The rest I tried to ignore ;-)

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

      Thanks for the tip! I’ll keep that in mind :)

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

    you should be getting paid for teaching so thoroughly i cant imagine the amount of preparation it requires to simplify so clearly all the information for the learners
    (and i thought brackeys was the best tutorial creator out there even though his tutorials are kinda outdated now but guess who im switching to nowww)
    p.s. the amount of side videos linked to this one is incredible

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

    @19:48 I'm confused. You mentioned you recommend using Invoke Unity Events but then you said you don't recommend doing it.

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

    Your tutorials on the Input System are fantastic! What are you using for VS Code extensions? I can't never install one that give me a list of properties that are accessible and the autosuggest/complete for anything is a nightmare.

  • @codersexpo1580
    @codersexpo1580 Рік тому +3

    Just a small note here: @6:06 for WASD, NOTE: "When adding a composite, only ones compatible with the value type of the current action are shown. This will, for example, no longer display a 2D Vector composite as an option on a floating-point button action". To show the 2D vector composite just change the action type to "value" and the control type to "Vector2". Now the 2D vector composite option will appear. So @5:45 that's a very important step.

  • @Zee.MusicCompani
    @Zee.MusicCompani Рік тому

    works gj

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

    Awesome

  • @lilSapphireFox
    @lilSapphireFox 2 роки тому +5

    I started to scream when you used the update function. Good thing you saved it :D I have been working with unity for over 3years now and I think I use Update in maybe 3 or 4 of my hundreds of classes, and only with an if statement. it's really usually unecesarry to check something every frame...

  • @MatthiasTTV
    @MatthiasTTV Рік тому +1

    Great content on your channel, you have a new subscriber! But here I got completely lost when you were explaining the recommended way of PlayerInput--you said the problem with UnityEvents is that it combines all the phases (started/performed/canceled) into one, but then when you showed the PlayerInput you just showed ReadValue and not how to access the different phases. So I'm still not really sure how to call different functions when different buttons are pressed. Do I have to read all the actions like "Jump", "Explosion", etc. all in the Start function and call functions accordingly?

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

    SNice tutorialt, it's the nice tuto

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

    Hello, samyam could you explain to me why my code pops up with the error "There are inconsistent line endings in the 'Assets/Scripts/PlayerControls.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands." until i fix this problem i can't move my player or have the jump

  • @Rohityadav-lf4lo
    @Rohityadav-lf4lo 2 роки тому +1

    Full suppot

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

    Please now make vids about the new Ui Builder, you covered the new input system amazingly!

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

      It's on my list! Thank you :)

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

    My jumpAction.ReadValue(); doesn't work in awake but it does for update?

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

    how would you go about handling a bluetooth button to be an input for a game? I am wanting to make a mobile game and have a bluetooth button (the buttons you can get from aliexpress which bluetooth to the phone to allow you to take selfies without touching the phone). I have one of these buttons but I can't work out how to get unity to detect it as an input.

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

    Is there a way to put something like Shift+WASD or Alt+WASD on the input system? I want my player to switch targets while targeting. If they hold Shift, and then while holding shift press WASD, they will change their targets to the above/right/below/left.

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

    why every time i modify the default input action, every change goes back to default the next time i open unity?

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

    How can i listen Android Hardware Back Button with new input system. I tried Usages>Back on InputAction but not worked

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

    Would it be okay if I use Player Input component in several objects?

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

    I had started using the new system about a week or two before I found this video and I'm not sure if I'm doing something terribly wrong. Right now I have an action map with actions such as Jump or Dash, and I'm referencing them in my scripts with OnJump or OnDash as if they were functions. I haven't enabled anything, the only thing I've done is included it the input system via using UnityEngine.InputSystem and created a reference to the CharacterController (which the functions/actions influence). This way seems so much simpler than what you're showing and I don't know if it's going to cause a problem later on such as a memory leak or something (because I'm not enabling/disabling anything).

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

      If the functions are called directly from the PlayerInput component (either through SendMessages, or the Events) then you should be fine. There's many ways to use the new system, you only need to unsubscribe from an event if you've subscribed to it somewhere in your script.