Switching Action Maps in Unity's Input System

  Рет қаралды 35,812

samyam

samyam

Күн бұрын

Пікірлер: 80
@DanDectis
@DanDectis 2 жыл бұрын
Seems like every time I go searching for how to solve my next game development problem, I land on your videos! Thank you for your work. It has been an enormous help!
@franciscooteiza
@franciscooteiza Жыл бұрын
This channel is useless
@sprite1015
@sprite1015 2 жыл бұрын
I love that you were the first result when I googled this problem. Its nice to know someone is on top of making these tutorials.
@travhimself_
@travhimself_ Жыл бұрын
Straight to the point and super accurate. (Still works great as of 2022.3.12f1). Thanks, Sam!
@viraj3944
@viraj3944 9 ай бұрын
This channel is extremely underrated
@G-Five
@G-Five 28 күн бұрын
Thank you so much!! i've been searching for an hour how to do this, this helped so much, you are so underrated!)
@LoxagosSnake
@LoxagosSnake 2 жыл бұрын
Definitely among the best Unity tutors on KZbin.
@samyam
@samyam 2 жыл бұрын
Thank you so much that's so nice!!
@xthanatos89
@xthanatos89 11 ай бұрын
You are always here when I need you the most!!!
@kazmaBlends
@kazmaBlends 3 жыл бұрын
Another awesome video! I love how easy to understand are these tutorials!
@samyam
@samyam 3 жыл бұрын
Woot woot!!
@gfujigo
@gfujigo Жыл бұрын
Awesome video. Quick, very informative, and to the point without needless complexity. Keep up the good work. Saved me a ton of time.
@samyam
@samyam Жыл бұрын
Thank you!
@JTMartineau
@JTMartineau 2 ай бұрын
Thank you for your great videos!!! You are so concise and insightful!
@eldelnacho
@eldelnacho 3 жыл бұрын
oh my god i needed this, thank you so much. You're videos are awesome, thank you for explaining the "new" input system.
@samyam
@samyam 3 жыл бұрын
thank you so much!
@eldelnacho
@eldelnacho 3 жыл бұрын
@@samyam your* lol
@benjaminlehmann
@benjaminlehmann 2 жыл бұрын
Your content is so useful, so clear, and so helpful. Well done, and thank you :D
@samyam
@samyam 2 жыл бұрын
Thanks so much Benjamin! 😄
@Dustb0
@Dustb0 9 ай бұрын
Thank you so much, you just saved my day 🙏
@Toksick7
@Toksick7 2 жыл бұрын
When I use the method SwitchCurrentActionMap on playerInput i get an error of that the function doesn't exist
@David-gu8hv
@David-gu8hv 2 жыл бұрын
Excellent! Thanks @samyam!
@kurbol
@kurbol Жыл бұрын
Very clear video. Thank you!
@seanlaughlin4143
@seanlaughlin4143 Жыл бұрын
Can you explain when you create your OWN UI action map in your custom just as you did why the UI elements then break? Just switching the Actions Assets to your Own doesn't seem to do the trick from my own understanding. The only way I can get the UI elements to work is to use the Default Input Actions for UI elements??
@SuperDutchrutter
@SuperDutchrutter 2 жыл бұрын
Very helpful thanks for the tutorial! Likely saved me a bunch of time.
@NostalgiaNote
@NostalgiaNote 9 ай бұрын
That's GodSent Good Info for us little game developers ~~
@alejandrogomez4158
@alejandrogomez4158 3 жыл бұрын
Just discovered your videos and I'm amazed at the amount of quality. Really good job. I've been having trouble with Unity's new input system recently. Do you by chance know how execute different code depending on the input device? For example, aiming with the mouse (top down perspective) uses different calculations than aiming with a controller's left stick. Again, great job on the videos!
@samyam
@samyam 3 жыл бұрын
Thank you so much! Make sure you have 2 control schemes declared in your input action asset, one for your mouse/keyboard and one for your controller (kzbin.info/www/bejne/o2a6pKCierR5n6M). You can check the current control scheme by doing playerInput.currentControlScheme. You can also subscribe to a playerinput event controlsChangedEvent and get notified when the player switches to another control scheme docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.PlayerInput.html And execute code depending on what control scheme the player is currently using. forum.unity.com/threads/detect-most-recent-input-device-type.753206/
@alejandrogomez4158
@alejandrogomez4158 3 жыл бұрын
@@samyam thank you! This helps a lot I’ll check these out!
@MayurChauhan1995
@MayurChauhan1995 3 жыл бұрын
Can you make a video on getting values from sensors using unity's new input system or provide some stuff that can help to get through it, because there is not any video or proper documentation more code available on the internet to get value from sensors using new input system.
@samyam
@samyam 3 жыл бұрын
That's on my list! Although my list is very long so I'm not sure when I will release it. The documentation isn't great but here are some links: docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Sensors.html forum.unity.com/threads/tutorial-for-input-system-and-accelerometer-gyro.887758/
@wulumgames
@wulumgames 3 жыл бұрын
This was really enlightening.
@remus-alexandrusimion3439
@remus-alexandrusimion3439 2 жыл бұрын
Quick question: I am using the UI Toolkit and i have a UIDocument disabled. However, whenever i press Space it triggers a button from that UIDocument instead of doing my binding. Is this also solvable by disabling/changing the binding in the Event System? Or will it cause other unwanted behavior?
@samyam
@samyam 2 жыл бұрын
I don’t have experience with the UI Toolkit yet unfortunately 😞
@cameronpheiffer5233
@cameronpheiffer5233 3 жыл бұрын
Samyam would you be able to make a video on Local multiplayer Third person cameras ? Maybe a camera that can rotate around the player with the right gamepad stick And movement on the left gamepad controller ?
@cameronpheiffer5233
@cameronpheiffer5233 3 жыл бұрын
I’m trying to create a Third person character for my local multiplayer players but can’t find any tutorials on how to make a third person camera for local multiplayer players. Would cinemachine be a way to approach this type of camera ?
@samyam
@samyam 3 жыл бұрын
I have two third person videos with Cinemachine: Cinemachine Third Person Controller w/ Input System - Unity Tutorial kzbin.info/www/bejne/f57YdKuVjbuUe7M 3rd Person Shooter Controller with Cinemachine & Input System - Unity Tutorial kzbin.info/www/bejne/iZaldqmDZ9-Aprs I have a video on Local Multiplayer here kzbin.info/www/bejne/nZDWYaxrrqurj8k Local Multiplayer with the New Input System doesn't directly support Cinemachine, but there are ways around it forum.unity.com/threads/new-input-manager-split-screen-and-cinemachine.811134/
@MaskedImposter
@MaskedImposter 2 жыл бұрын
I can't seem to get it working with the UI Event System... Is there a special way you have to enable it or something?
@SMT-ks8yp
@SMT-ks8yp 3 жыл бұрын
Why can disable function not work both on maps and individual actions? I'm trying to make uninterruptable actions through disabling all or most actions and then enabling them after certain amount of time, but they still are active when they should not be despite creating and calling a method which contains nothing but Enable and Disable for what I want.
@samyam
@samyam 3 жыл бұрын
You can definitely disable/enable individual actions. // Enable a single action. lookAction.Enable(); // Enable an en entire action map. gameplayActions.Enable();
@SMT-ks8yp
@SMT-ks8yp 3 жыл бұрын
@@samyam I said I did this, but they are still working despite being disabled. Could it be because I'm trying to use generated code and PlayerInput component at the same time?
@diliupg
@diliupg 3 жыл бұрын
@@SMT-ks8yp this is what happens when you make videos watching other people's videos.
@samyam
@samyam 3 жыл бұрын
Possibly yes you might have it enabled it on and disabled on the other. I recommend sticking to one solution instead of using both to minimize confusion.
@SMT-ks8yp
@SMT-ks8yp 3 жыл бұрын
@@samyam fixed this, using generated code with interface feature. Now the question is how to refresh value actions once they are re-enabled. Like movement direction vector, so the character would not move where he was told to the moment move action was disabled. Is this already explained somewhere on the channel?
@7WR777
@7WR777 Жыл бұрын
if i open my action map there is nothing there but all of the assigned keys work
@mr.soulless904
@mr.soulless904 3 жыл бұрын
Hey samyam... i’ve been trying to create a Topdown Shooter game with a ps4 controller, but sadly I can’t aim with the right analog stick, please any help?
@samyam
@samyam 3 жыл бұрын
What kind of error or problem are you having exactly? If you add the gamepad/ps4 right stick delta as an action, you can then read the vector2 value in code, and move the aim with the delta value you are reading
@mr.soulless904
@mr.soulless904 3 жыл бұрын
@@samyam i’m not having any issues, i’m just kinda new to input system and I don’t know how to do it😓
@wanchester6626
@wanchester6626 3 жыл бұрын
hey, how can i use hold button in input system i have a button but i want it to work with holding not with 1 press
@samyam
@samyam 3 жыл бұрын
You can add a Hold Interaction, in this video I go over interactions kzbin.info/www/bejne/Z2i5ooKeaMStrrc
@wanchester6626
@wanchester6626 3 жыл бұрын
@@samyam thnx
@AJMarraffa
@AJMarraffa Жыл бұрын
For me, playerInput.SwitchCurrentActionMap("MapToSwitchTo"); isn't working. However, using an instance of my Input Actions Asset and calling Enable() or Disable() on the maps manually *does* work. Hopefully I can manage to work out why this is. Great video, thanks!
@vikneshtk
@vikneshtk 3 жыл бұрын
Your videos on the new input system are really great. Keep the good work !. Just curious to know, how do we use two action maps without having a key binding to switch between them? Use case scenario is having a world space UI on the scene above a gameobject, where I have both object interactions and UI interactions. Hope you understand my question.
@CyberAngel67
@CyberAngel67 3 жыл бұрын
UI deals with this automatically through the eventmanager
@diliupg
@diliupg 3 жыл бұрын
@@CyberAngel67 it does NOT happen with the new input system
@CyberAngel67
@CyberAngel67 3 жыл бұрын
@@diliupg Yes it does, I have been studying and teaching the new input system for around 12 months now, and the new input system does deal with it out of the box. However, for something more peronsalised to your game, you need to set it up. Maybe you can share exactly what your issue is, so we can advise more precise steps on how to achieve it!
@JakubMachowski
@JakubMachowski Жыл бұрын
Thanks for video! :)
@ponxalot
@ponxalot 2 жыл бұрын
very helpful, thanks a ton!
@brutalsam90
@brutalsam90 3 жыл бұрын
Hey Sam, just noticed when you mentioned patrons, there was a name АРТЕМ, i think it is russian name and pronounced "Artyom", just like protagonist from Metro games.
@samyam
@samyam 3 жыл бұрын
Thanks for letting me know! It's hard to know the pronunciation just from seeing the name, so I appreciate it!
@ogidev8815
@ogidev8815 3 жыл бұрын
I'm new at Unity. I want to watch your videos but how should I start? Any playlists?
@samyam
@samyam 3 жыл бұрын
I have a mini-series for beginners!! Unity Beginner Mini-Series kzbin.info/aero/PLKUARkaoYQT178f_Y3wcSIFiViW8vixL4
@DonDisainer
@DonDisainer 2 жыл бұрын
thanks!!! as always very usefull!!!
@de0o0
@de0o0 2 жыл бұрын
I still wonder which approach is better, use script or playerinput component. If it's just personal preference then I would use playerinput, it seems much more cleaner. Also I have one big blowmind about using newinput system in for example rts game. Inputs them selves are not that clean like in this example, there is no like character or something like that, there are functionalities like selecting or do action for some specific units buildings etc. Giving that example the question I want to ask is, What is the convention of creating action map? btw sooo good work! Very solid and to the point tutorial!! :)
@杨悍文
@杨悍文 3 жыл бұрын
How can I use new input system with PlayMaker?
@samyam
@samyam 3 жыл бұрын
Sorry I'm not familiar with PlayMaker, perhaps this thread can help? hutonggames.com/playmakerforum/index.php?topic=20498.0
@bulalaish
@bulalaish 3 жыл бұрын
I hope Unity pays you for this, because they should
@samyam
@samyam 3 жыл бұрын
I wish 😂 Thanks for the support :)
@hosseinse4079
@hosseinse4079 2 жыл бұрын
thank u it is great
@LukeHwarang
@LukeHwarang 3 жыл бұрын
Execelent!
@svenmehlhorn2173
@svenmehlhorn2173 Жыл бұрын
lov your vids uwu
@henrry.valenzuela4670
@henrry.valenzuela4670 3 жыл бұрын
Please .. Some kind of smart contract development on the bsc blockchain
@samyam
@samyam 3 жыл бұрын
Sorry what?
@spindlispider3519
@spindlispider3519 Жыл бұрын
Useless
@franciscooteiza
@franciscooteiza Жыл бұрын
This channel is useless
@BALI409
@BALI409 2 жыл бұрын
very complicated tutorial , you talk too fast and your explanations are ambiguous. even if i wanted to copy the code , i can't.got no money for your patreon sorry
@StickyLabDev
@StickyLabDev 9 ай бұрын
unclear
@kwombat5306
@kwombat5306 9 ай бұрын
how do I open this input system
How to Enable UI with the New Input System
6:33
samyam
Рет қаралды 69 М.
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
every step to actually make your dream game (then sell it)
24:27
i paid Fiverr devs to make a game in Unreal Engine 5
10:05
Making a Soft Indie Rock Song (Far Caspian, Coin)
29:28
Trev Barnes
Рет қаралды 9 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
The Power of Scriptable Objects as Middle-Men
17:41
samyam
Рет қаралды 131 М.
Unity Code Optimization - Do you know them all?
15:49
Tarodev
Рет қаралды 199 М.
Unity async / await: Coroutine's Hot Sister [C# & Unity]
16:18
DevVlog 53 - Transparent 3D Objects in Unity
24:54
Matt Whiting
Рет қаралды 95
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН