Це відео не доступне.
Перепрошуємо.

Controlling Cross-Platform Characters with Unity Input System | Tutorial

Поділитися
Вставка
  • Опубліковано 19 сер 2024

КОМЕНТАРІ • 175

  • @jayjoonprod
    @jayjoonprod 3 роки тому +20

    Using the Input manager component with those callback methods was what I found the most approchable for beginners

  • @dartutorials7859
    @dartutorials7859 3 роки тому +29

    Every new Unity Video I realize my Game is missing something 😂😂😂 Thanks!!

  • @DevDunkStudio
    @DevDunkStudio 3 роки тому +20

    This is such a useful feature and shouldn't be so hidden away!

    • @FranciscoTChavez
      @FranciscoTChavez 3 роки тому +4

      This entire thing is a new plug-in, that's meant the replace the current system. Calling it hidden isn't really a correct description; it's new(ish). Unity does have a free course on how to use this new Input System. The course is more detailed, but it sort of skipped the final details at the end where we actually use the values provided by this new Input System.

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

      @@FranciscoTChavez I know that, but even on my school (game development) I am one of the only ones who even knows this is a thing.

  • @DevDunkStudio
    @DevDunkStudio 3 роки тому +12

    Glad to see I use it properly!
    Documentation can be a bit vague

  • @skanda2186
    @skanda2186 2 роки тому +19

    One important note :
    You need to set event functions IN the prefab and not in the prefabe instance of the scene.
    Otherwise it won't function proporely.

  • @youssefkassem4895
    @youssefkassem4895 3 роки тому +7

    Amazing tutorial I've been trying to make it work for so long and after watching this everything worked perfectly

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

      We're glad this helped :)

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

      @@unity please zoom in wherever possible while making videos so that we can see 👀 better & understand better 🧐🤔

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

    2:17 It would've really helped if you'd explained that you need to first add "public PlayerInput playerInput;" *and* get the component in order to make this functionality work. I was so confused.

  • @rolandwomack9326
    @rolandwomack9326 3 роки тому +89

    your new input system is a step in the right direction, but its way too convoluted and over engineered solution for the most fundamental feature of any game, specifically the cross binding and rebinding new keys in game between gamepad and keyboard. It would be awesome if you had more documentation / examples on this.

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

      I agree that it is convoluted in the way that's shown in the video, but using C# events with delegates rather than Unity Events makes things much faster and easier. I would recommend checking Brackeys' tutorial for this.

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

      @@emredesu Link? I could search but I don't know if your referring to a C# / delegate video, a Character controller video, an Input system video, or something else.

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

    Thanks unity for providing your wisdom. I'm trying this for 2 days and now I got the trick to do this.. 😇🙏🏻

  • @marcuscheong
    @marcuscheong 3 роки тому +8

    Thank you Unity for this useful input system

  • @t0themax
    @t0themax 3 роки тому +13

    Touch controls doesn’t seem to be working/included in the project

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

    Thanks. This makes it easier to understand the new input system, I usually use the old input manager

  • @ziphomfeka9208
    @ziphomfeka9208 3 роки тому +46

    When is all this learning gonna end😫😴😂😂

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

      Hang in there, at one stage, all start to connect and the stars start to align and we look at it as good knowledge to make game faster instead of burden of learning =)

    • @Isaac-mp5eq
      @Isaac-mp5eq 3 роки тому +5

      Learning is the best part!

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

      It ends when you have a large team of people, each focused on their own specialities. :P

    • @SpaceDave-on8uv
      @SpaceDave-on8uv 3 роки тому +3

      NEVER

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

      i’ve started learning in 2013, and still here I am

  • @Haapavuo
    @Haapavuo 3 роки тому +15

    1. Can player remap the buttons?
    2. How would you implement input button glyph visualization that updates when input method changes?

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

      Public keywords they are a variable and can be changed upon input!

  • @burakcimenli
    @burakcimenli 3 роки тому +9

    It might be just me but it feels more complicated than necessary. But still good job overall thank you

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

    This was very helpful I am developing a test game and this will be a good start thanks unity

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

    Awesome! Thanks for sharing :)

  • @DerAua
    @DerAua 3 роки тому +8

    I've selected my playercontroller script, but I cannot set any method. Sad. This is the fourth tutorial that fails me.

  • @MakakaOrg
    @MakakaOrg 3 роки тому +16

    So, when the old Unity Input System will be deprecated?

    • @0bando
      @0bando 3 роки тому +7

      2099

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

      No reason to force other devs to use this if they already have working systems. It won't be deprecated for a long, long time.

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

      Answer from Unity live session:
      Kristyna Hougaard:
      We don’t have an ETA for that yet. New systems such as UI Toolkit or DOTS will be fully supported by the Input System only and the old Input Manager, so it’s a bit of a gradual process.

  • @Tikode2
    @Tikode2 2 місяці тому +1

    Here is some code they used in the video
    Public void OnMovement(InputAction.Callbackcontext value)
    {
    Vector2inputMovement = value.ReadValue();
    rawInputMovement = new Vector3(inputMovement.x, 0, inputMovement.y);
    }

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

    This is amazing, thank you so much!

  • @darth0sasha
    @darth0sasha 3 роки тому +5

    How would I go about making inputs touchscreen? Not on-screen buttons, but actually clicking some game-elements on screen acts as an input. (like fruit ninja for example). I don't understand how to switch to something like this on mobile while on PC it acts as a simple keyboard input instead.

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

      You'd basically want to detect a swipe event and then act on the GameObjects within that swipe distance. Then you draw a trail or something so the player can see it, and then you make the fruit explode. :)
      Just break it down in pieces if it gets overwhelming. Engineering is hard.

  • @youssefashraf8925
    @youssefashraf8925 3 роки тому +19

    Thats so cool engine

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

    Thanks this helps a lot for me

  • @MrPiggybank1974
    @MrPiggybank1974 3 роки тому +7

    @Unity What gets me is every video you watch from unity, in particular, they only show you how to use this new input system on a gameobject never from the UI perspective and then into a game scene where you control the player.

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

      just add the Player Input component on your UI gameobject and select the approriate callbacks.
      If that's what you were asking about

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

    Great now I want to program this via script.

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

    Ok, at 5:23 you open up the drop down to show the Events in the Player Input, what I missed was a few seconds later at 5:25 was when you clicked that second drop down to expose the Player Controls... this cost me hours of trying to figure out the other event boxes wouldn't accept my Input methods from my script and was super frustrating. Maybe you should put up an annotation or something?

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

    omg this will help me much thanks unity

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

    A way of assigning keyboard keys to ui objects would have been perfect for me...

  • @TheEveningEconomies
    @TheEveningEconomies 3 роки тому +14

    I get how this fancier and more extensible but Christ is this confusing for beginners

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

      Crazy. Nothing seems to work. Only the exact speciied scenario for every tutorial.

  • @AniketSingh-hr8mi
    @AniketSingh-hr8mi 3 роки тому +5

    all these new technologies in Unity like this Input are nice but tbh their implementation is way different and difficult for a beginner.

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

      It’s doubtful a true beginner will be trying to develop cross-platform, or offer fancy customizable controls within his first games. This is more of an intermediate feature, for which the complexity should be reasonable.

  • @Elenthiriel
    @Elenthiriel 3 роки тому +4

    i fallowed the tutorial exactly the same, and yet, when i keep the button pressed down, the event was only called once, instead of continuously :D
    The system itself is pretty cool, i really liked but lack of explanation for the those "edge cases" is HORRIBLE. Even the Documentation is not good to explain that

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

      me paso lo mismo

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

      Exactly!!!! I've just discovered this too, and now have to switch back to my old Input methods.
      Well that's what GIT is for ^^

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

      @@TheOfficalAndI there is a solution. Create a boolean variable to indicate if the input is being pressed, like: "isMoving"
      If you need to get data abou the direction, create another global variable Vector2 do hold the direction.
      Inside the event method use performed and cancelled to update both variables.
      In the class that you will use the data from the input. Create a reference to the class containing the input method and the variables you create(which must be monobehaviour). Use the boolean value in the update loop to conditionally call the function that will perform the action, and the vector2 you created to indicate the dicretion.
      It worked for me
      It's not as good as if it worked continuosly by default, but still way more Modular.

  • @ZombieChicken-X
    @ZombieChicken-X Місяць тому

    What should be the approach if I want to change something about the display based on the current scheme? For example when I'm showing the player what button to press

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

    I don't get anything in the Inspector when trying to hook up the events. Everything in my class is public but none of them are listed in the Inspector to be assigned.

  • @alexandreclement9399
    @alexandreclement9399 3 роки тому +5

    A good step but it is soooo overcomplicated and overkill compared to what it's supposed to do

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

      Still better than the paid ones, where you don't know what you get and doesn't work with next Unity version. And it's not that complicated, you just need to get used to using it.

  • @KS-ql3uj
    @KS-ql3uj 3 роки тому

    Yay! :D thank u Unity!

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

    It says "rawInputMovement does not exist in the current context"
    How can I fix this?

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

    The new input system caused my animations to stop running on a 2d game, you need more documentation on using this system with 2D games

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

    Спасибо!

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

    "Crossplatform"... Even though what is said in this tutorial is true, porting a game to xbox, switch and ps4 is quite a challenge and can take up to 6 months. Abstracting the inputs is just a tiny, almost negligeable part of the port.
    My dream is that one day, Unity release a true "crossplatform" package that can handle the most tedious crossplatform tasks: storage with saveslots, user management with multiple controllers, generic and uniform messaging, achievements. That would make unity a great ENGINE by letting developpers focusing on the gameplay. It would also allow more games built with unity to be shiped on the market.

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

    Finally!!!

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

    one of the cool engine

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

    I'm doing something wrong here. With WASD my player just jumps N, S, E or W a set amount per key press.

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

    I'm still new to Unity...
    > I like the more intuitive " Input Action Asset," but I have yet to understand and how to get it to work properly...
    2:20 ---> I feel like there should be links to the screenshots because they go away instantly...
    > I realized it's a video and it can be paused to view to code...

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

    Does the new input system work with the UI Toolkit yet? I'm on 2021.2 (Alpha)

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

    In 2022 it doesn't work out of the box unless I missed something, I am pretty sure I need an InputActionManager in the scene, it may also be that I need to enable the action map or the specific actions...

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

    This won't work if you follow everything perfectly! The video does not show adding devices to a control scheme from the Input Actions Asset. Important step; won't work without it.

  • @ramsey2155
    @ramsey2155 3 роки тому +8

    this engine has 8 pistons

  • @taykufc
    @taykufc 3 роки тому +21

    More confusing and complicated than needed... Unity could do a LOT of things easier for devs

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

      It basically front-loads all the complexity. Once you've got the system set up, it really shines -- using callbacks makes for some very modular code and it lets you do compile-time checks of your input management.

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

    When will it be fixed for Unity 2020?
    EDIT: It does work now

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

      I stand corrected. It actually looks like it's working in 2020.1 now

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

      @level90s nice, yea for a while it was broken in 2020+

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

    You have to add this line to your script if you want to use the Input systeme
    using UnityEngine.InputSystem;

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

    Download the project and it does not have Mobile support. I tried to do it myself and every time I click the button for my player to jump ... Unity closes.

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

    wow awesome

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

    Ya, that’s bindings, it’s ok. Fine. What I should do for support touch and game pad? How switch on the fly between touch/game pad/keyboard ?

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

      Rewatch more carefully the tutorial, lol

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

      @@revengerwizard I’m think you don’t understand me

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

      @@zitskycom The Input System supports also touch and game pad, you just haveto search it in the bindings. Also, to switch on fly you can use the method shown in the video. Or explain yourself.

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

      YOu don't have to rebind them, because it detect what platform on you, and switch automatically.

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

      @@klarnorbert ok, I’m explain. Imagine tic tac toe. I’m can touch or click to socket for placement mark.. but I can’t do that on game pad. Should do some focus system and highlight selected socket, right? So, how I’m can do it in unity out of the box?

  • @Ash-vt5cp
    @Ash-vt5cp 3 роки тому +1

    Where is that Player Controller coming from at 5:08?

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

    Unity editor isn't recognising or listening to an xbox controller on my PC (it works for Steam games, so the controller is fine). How do I install or configure Unity to notice my controller?

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

    What about split keyboard?

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

      Just set up two keyboards with different inputs and assign the controls to each player and you'll have split keyboard gameplay

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

    how do i make it work for android?
    i followed the steps in the PDF for first person character and it wont work on my phone when i build to test it, the joystick does nothing... it registers the touch in the debug but it doesnt take the input no matter where i tap it recognizes the touch but no movement whatsoever..

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

    I have downloaded the latest version of this project from github and I am trying to learn how it works. 1 issue that I can't solve is that the camera has 2 modes, stationary and follow and orbit. But I only want one where the camera follows the player from behind and above his shoulder and turns using the mouse. I don't want the extra spinning and zooming that occurs in the orbit one. How do I change this?

  • @__Rizzler__
    @__Rizzler__ 3 роки тому +16

    I am addicted to unity. Can't stop making games. Thanks unity corp for making an engine like this. This is the best and most overrated engine.

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

      LoL same!

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

      I’m still in the learning stage but I feel you. All I’ve done so far is make a basic version of “Jenga” but the satisfaction of making a thing work is incredible. I’m now working on making a simple player model and I’m excited for the future possibilities!

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

      you meant underrated ;)

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

      @@robosergTV no it's overrated bro

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

      @@__Rizzler__ it seems you are using “overrated” wrong. That means “the thing is worth less than it’s made out to be,” which is the opposite of what you say at the beginning of your comment (unless you tried to be sarcastic). The right term would be “underrated”, as @Robko wrote.

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

    I having a problem where it only does something when the input value is changed. I dont know how to run this consistently and even tried doing your code and still nothing. If you could tell me why this is happening, that would be great. Thank You

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

    Could you guys make a proper unity 2D movement tutorial?

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

      Hey there. Is something like this what you're after? learn.unity.com/tutorial/live-session-2d-platformer-character-controller# ? Let us know if not so we can ask around for you.

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

      @@unity Hi, thanks for answering my comment I'm looking for a proper movement tutorial for unity 2D but I can't find a good tutorial in unity learning section. It seems you're just modifying already cretared game
      and also in the tutorial videos you are just learning how to use one specif command but you never learn how to use this command for making something works. like using varibles and functions in the same video. But this link (tutorial) seems actually doing everything I wanted :p

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

    why u dont show me the OnButtonScreen

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

    its already used in the Chinese version of Unity.

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

    I cannot reference my Function in the Unity event, any help?

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

      using UnityEngine.InputSystem;

    • @JamesWilson-wh1so
      @JamesWilson-wh1so 3 роки тому +1

      @@studioschmudio9916 I have this issue too however I am referencing UnityEngine.InputSystem... It just doesn't give me the option to choose OnMovement. This tutorial has missed alot.

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

    Still wait for joy cons support

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

      Its supported???? You mean the L3 R3 buttons in playstation console ?????

  •  2 роки тому

    Hello, OnScreen controls not working on Android but working fine on unity, any ideas?

  • @NeelamSharma-ku5di
    @NeelamSharma-ku5di 3 роки тому

    Thanks my new game get help

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

    Why don't the callback Methods trigger whenever there is an input happening?
    They just fire when the input(vector2 stick) changes.
    That way i can't interrupt player walking and then have them walk after doing an action again, if they don't change the movement vector.
    That sucks!
    I am probably gonna do my own input class instead. Or is there an easy solution to this?

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

      Don't put output in the callback, do it like this instead:
      void Update(){
      OutputMove();//transforms your output move results to your object every frame.
      }
      input move(callback value){
      read value, result the value into to something your transform can use
      }
      Output Move(){
      //transform code goes here using variable from callback.
      }
      You need two functions, one reading input callbacks, and one for outputting in update.
      For Booleans, this is what I did to check if character is firing reading the right trigger callback:
      public void InputFire(InputAction.CallbackContext value){
      if (value.started) { autoFire = true; }
      if (value.canceled) { autoFire = false; }
      }
      Then output is firing if that's true every frame, based on a fire rate delay timer, etc.

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

    harder than all people thought

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

    I experience a massive lag when I build and try to control characters in the build via a controller on a MAC.
    Is there something I can do to remove this lag for build versions?

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

    How do I use this with a Character Controller instead of a Rigidbody?

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

    The Editor did not accept my request to furnish your scene automatically with an XR Rig, citing "Main Camera is not in the root of the hierarchy." So, I went ahead and added the Rig and VR camera manually. Everything works fine. But should I be concerned that now there are sort of 2 cameras doing the main rendering? I can't delete your legacy camera because then the game would not respond to inputs. Thanks!

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

      did you find a solution to this, or just kept it this way?

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

    Does player input manager support cinemachine?

  • @Ravik-no6wx
    @Ravik-no6wx 3 роки тому

    It's great, but also it's a pity that you can't bind mouse with OnMouseDown etc. events to that :

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

      If you are implying that you can't set an action to the press or the release of a button, that's not the case. You can check the state of the action with value.start (it's a bool equivalent to OnButtonDown), value.performed, and value.canceled (OnButtonUp). Look at the script of the attack in the video, he uses an if statement with value.start. If you were referring to something else i would like to know :)

    • @Ravik-no6wx
      @Ravik-no6wx 3 роки тому

      @@AgusGamesPC Ok, so What I meant was that I can't (or don't know how to do that) use events like OnMouseDown, OnMouseEnter, OnMouseExit when using new input system. Everything is great when I want to use keys from keyboard, or gamepad, but when it comes to mouse-related game actions - I can't figure out if it's doable....
      I wanted to execute some function when mouse hovers gameobject - with old input system I used events mentioned above, in new system - dunno ;x

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

      @@Ravik-no6wx Oh ok, in that case, i don't know how to do that yet, sorry. But i'm certain there is a way, everything that could be done with the old system can be done with the new one, so... Let me know if you find out, i'll make sure to let you know if i do ^_^

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

    i dont understand how i get the values

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

    The setup is really clunky; Isnt there a way to do it in-script instead of using the inspector to setup events and have the values read straight up?

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

      Yes use c# (Invoke C Sharp Events)

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

    where you have the player controller script?

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

    For some reason for me new input system doesn't work on GUI elements (menus), clicks of the mouse aren't registered. It works fine in game scenes though. Anyone else had this problem?

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

      Do have have an EventSystem that is listening for input in the scene?

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

      @@TheJScriptKid Yes, I googled the problem and seems like a lot of people have issue with it, haven't found solution yet

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

      ​@@urskiz You say you have an EventSystem but have you actually updated said EventSystem to use the new 'Input System UI Input Module' component in place of the existing 'Standalone Input Module' component?
      If you click on the EventSystem in the hierarchy and look at its components in the inspector, you'll see a "Standalone Input Module" component on it with a notice right at the top that it's incompatible with the new InputSystem and below that a button that says "Replace with InputSystemUIInputModule". This will replace the incompatible component with the required one.
      It's something they missed in the tutorial and in theory they should probably add an option for it to be done automatically upon importation of the InputSystem, but alas it is a super simple solution to just click on the button for each EventSystem you have.
      If you've done the above and can replicate the issue in a new project, you may want to report a bug for the version of Unity you're using.

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

    that code wont work

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

    The simple sample is not even using a keyboard, it uses a gamepad, new input system so buggy, its been 3 years

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

    5:58 When did 'rawInputMovement' become the variable holding the direction we are moving in? At 0:40 the attribute holding our movement direction was 'inputDirection'.
    You never mentioned if the old movement input code was disabled.
    I didn't see you do anything to disable the old movement code.
    You didn't mention if installing the Input System will disable the old movement code.
    Yet, at 6:59, you are using "ASDW" as proof that the Input System you just hooked up is working, but the old code would also move the character with "ASDW". How do we know that it's not being moved with the old code? 8:23, no, using the gamepad didn't prove anything for movement because the left-analog stick on most gamepads is bound to "Vertical" and "Horizontal" by default. If you had bound it the the right-analog stick instead, and it worked, then that would have been proof.

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

      the a button worked on the gamepad. but moreover. he shows the input debugger -_-

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

    I can see a barbarian from clash of clans in the video

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

    I did everything perfectly until you started talking about codes randomly threw me off so bad

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

    this doesn;t work me :v

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

    dont work nothing happends in fact gamepad works ui and mouse works but keyboard don t work and i get lot of unsupported device in debug
    ok i delete the input change in project setting let empty in supported device make a new controller and it Works
    like it when it works

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

    i whish brackeys make a video tutorial about this...

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

    First

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

    using UnityEngine.InputSystem;

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

    This is meaningless when you didn't show what the script is, and when the new user like me, would never get to know how to use input system after watch it.

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

    Hello unity, I am your biggest fan. I was recently turning my old ping pong game into a multiplayer pong game using photon 1
    . Could you pls help, I am struggling in instantiate of paddles at their respective locations.

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

    5:52 this is getting called only once. This cannot be correct.

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

      If the action 'movement' or 'attack' fires, it will emit an event which triggers the 'OnMovement' and 'OnAttack' methods. So they are getting called each time the player attacks or moves. It is correct. :)

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

      It's event-driven, that's why. You no longer need to check if the user pressed a key in Update.

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

      The video is missing parts of what is actually needed. Notice how rawInputMovement is initialized somewhere else. You update the transform.position in FixedUpdate() so when the OnMovement() function is triggered, the rawInputMovement variable effects the transform. Hope this helps. Took me a while to notice.

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

      @@linnosmg I actually found the solution. Those events are only for changing the state of inputs. So when we press a button, the InputSystem sends an event and say this is the new state of that button. So we need to make a variable somewhere to save the last state of that input. After that we just need to use that variable in Update methods. That's it.

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

    This tutorial explains basically nothing. Especially when you mention variables with no specified type.

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

    Only 2 comments

  • @-Plube-
    @-Plube- 3 роки тому

    Y’all should work on graphics optimization. My computer be catching on fire when I play unity made games

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

      Tell that to developers who made those games, not to Unity.

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

    Yea it's UE4's input system basically.

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

    worst input system I ever seen

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

    hate 😡 it's not even a tutorial

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

    Ok this was 100% useless to me right now. I have no idea how to connect the code to anything you are doing here.

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

    I'm sorry but I hate it. The previous system was more beginner friendly, this is just a nightmare.