Easy Mode: Unity's New Input System

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

КОМЕНТАРІ • 33

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

    Appreciate the blog post write up as well!

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

      I actually prefer written tutorials to videos ;) Most of my videos have a blog post too :)

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

    i was just looking for a video on the new input system. thanks

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

    When i finish the development of my game, i will watch the entire series of your rts game. This channel is amazing.

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

    Really appreciate the video. I know the new system is powerful, but I just have never taken the time to do a deep dive to learn how to set it up in the most efficient manner. I'm also more likely to use the event style you mentioned as well, which is 90% of my issue as I've never felt the time spent was worth it for a jam, for example. Having these quick references is great

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

    Thanks for doing the hard work of researching and testing.

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

    Quietly the best Unity tutorials out there, hands down. I feel like we viewers get an unfair advantage. 😉

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

    Thaaaaaank youuuuu!!!

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

    This is so incredibly helpful. I do love the flexibility of setting up Action Maps and whatnot, but being able to quickly prototype using the new system without all that initial setup is fantastic. This is perfect for all my current experiments. Thank you for making it super clear to understand, too. This is also the perfect way to be introduced to the latest input system as it just works with a single line of code. Want more functionality? That's when you learn the rest.

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

    Another solid video! I had issues getting the new system to work so I ended up buying the "Rewired" app, which made more sense in integrating my current project (with the old system) instead of rewriting it with the new input system. My next project though, this video looks like it'll be very helpful!

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

    It's finally here! Can't wait to watch this man.

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

    Cool!

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

    It was very useful. Many thanks

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

    Awesome video, i missed you!

  • @Diamond-yn4nu
    @Diamond-yn4nu Рік тому +1

    Thank you

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

    It would be nice to have an abstract/interchangeble wrapper around all this, so that we wouldn't have to write code for mouse,keyboard and gamepad separately

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

      We’ll to be honest that would be the input action asset. You create one action and make multiple bindings. But that takes you away from “easy mode.”

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

      @@OneWheelStudio There's another way:
      [SerializeField] private UnityEngine.InputSystem.InputActionReference _lookAction;
      _lookAction.action.ReadValue();
      It also gives access to WasPressedThisFrame and other values. I have not tested whether disabling the action elsewhere "deactivates" the reading of data at the point where you want to read directly, as in the example I gave.

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

      @@OneWheelStudio I remembered one more method. You can use the gameobject hierarchy as the state machine and at the very top add PlayerInput with broadcast. Then just add the methods with the action names in the place where you need them. Broadcast will not execute a method in a non-active gameobject.

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

    fantastic video, our game isnt neccasirily using complicated input gameplay so this is a great video to save and have on hand

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

    Thanks. That was a timely video. One other handy trick for everyone: I use it in OnPointerClick() eventhandlers instead of the update loop. For instance: In the inventory UI you want to check for a right click or leftShift + left click on an inventory item. Just make the class Selectable, and in OnPointerClick(PointerEventData eventData) run an conditional for capturing right click: (eventData.button == PointerEventData.InputButton.Right) or leftShift + left click (Keyboard.current.leftShiftKey.isPressed && eventData.button == PointerEventData.InputButton.Left). In this case I don't have to sandwich this into my already complicated Input Actions. I hope that helps someone else. Again, great yet simple topic.

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

    Easiest way to use the new input system is just make a public InputAction variable and .Enable() it in awake
    exposes all the bindings in the inspector
    Then just use the .readvalue for the InputAction variable in C# .ReadValue for joystick values .ReadValue for button values
    Can just plop in the bindings with the listen part of the exposed InputAction variable in the inspector. boom, you have access to every single binding you want
    Callback actions are nice for performed, canceled, etc.
    Can just subscribe to those or plop em in the unity events in player input

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

    I know this might sound weird, but coming from other engines after trying Unity for 1 year, this right here is one of the reasons I left Unity, there are so many layers of systems in top of each other, old system, new system, work around, that's why I tell people to try other engines and judge themselves when they are learning. I'm not saying Unity is bad, actually it is great, all I'm saying Unity is no longer the go-to easy to learn engine it used to be.

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

      Unity is trying to be everything for everyone. Pros and cons to that for sure. I do think it’s getting better (slowly), but totally get what your saying.

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

    I switched over to using it late last year, had been waiting since it was first launched and its in a great state now, very easy to use EXPECT the first time you look at it PLUS the whole 'Context' rubbish, its so unneeded and confusing considering the rest of it is fantastic!

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

    I got 2 things to say about the new input system... it is very good, but you always keep in mind if you are going to use it with Cinemachine, also if the game is Multiplayer, if it is local , matchmaking , server boosted, etc... and also...you might think if you are controlling some UI menus (select characters in gameplay mode while must use a UI player inputs and not the Player's input , , select characters menu UI scene) .... can be a nightmare... the reason people still using the old method , is not easy to manage the "new input system" In a simple character selection menu... sounds stupid... but there are not a clear way to "join" Players while keep the UI and the Player actions!

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

    Awesome video. I am current using Gamepad+leftStick+ispressed. Just wonder. How do I use trigger and bumper and arrow direction. I tried to check internet, but I couldn't find syntax for bumper, trigger and arrow direction button. It would be helpful if you have a tutorial for them. Thank you so much!

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

    ✅ Blog Post: onewheelstudio.com/blog/2023/7/4/easy-mode-unitys-new-input-system
    🚀Deep Space Directive: onewheelstudio.itch.io/deep-space-directive
    ♥Patron: www.patreon.com/onewheelstudio
    ☕Buy me a coffee: www.buymeacoffee.com/onewheelstudio

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

    I'm confused, I want to make movement by button cause it's mobile game but I don't find any video that teach how to do it.

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

      Yo be honest that sounds more like a Ui issue rather than a strictly input issue. There should be plenty of videos on setting up mobile UI.

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

    Hello I have a question, lots of peoples propose easy solution with PlayerInput etc... But nothing about more complex needs except Unity ua-cam.com/video/u1Zel20rwOk/v-deo.html
    Or atleast I think I need it.
    I also aksed on r/Unity3D but some peoples says it's not good practice because its like calling an event from an event?
    I made lots of research like InputActionReference, InputActionProperty
    But referencing an input per script seems a bit "messy"
    Any good tips? Or if you want to do a tutorial on how to handle lots of input on lots of different script that would save me!

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

    I’d call that legacy easy mode. There’s an easier more beginner friendly way IMO.
    True easy mode is (1) make input actions (this isn’t the hard part anyways) (2) attach Player Input component to a game object and place in the input action created (3) assign the unity event callbacks to a monobehaviour methods in the inspector. It’s visually clear and understandable and is a better (IMO) beginner friendly way to onboard onto the “new” input system.
    Feel free to use this procedure as video content. Maybe you can see some benefits of using this technique, especially for beginners.
    Thanks for making video content for game dev pedagogy :)