UE5 C++ Enhanced Input - 2 - Bind C++ Functions to Input Actions

UE5 C++ Enhanced Input - 2 - Bind C++ Functions to Input Actions

Druid Mechanics

1 год назад

62,541 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Nathan Andreasen
Nathan Andreasen - 17.10.2023 06:33

Just like to add, in 5.3 i typed showdebug en and thought it auto filled. It didnt. It showed some of the debug but not the full context until I selected the suggestion for the full showdebug enhancedinput.

Ответить
Brian Irvin
Brian Irvin - 03.10.2023 18:30

Other than Compile time is there any other reasons to forward declare?

Ответить
Slayerthegreat010
Slayerthegreat010 - 02.10.2023 04:50

Great video. In UE5.3 I can no longer get the console debug command to work is this a bug?

Ответить
George Bailey
George Bailey - 20.09.2023 13:26

I don't think that declaring pointers in "if" statements is just about performance. There's also a safety concern there - outside of the "if" statement, if you use the pointer, it might be null. By declaring the pointer in the "if" statement, you ensure that it's never used if it's null.

Ответить
VICKEY GAMING
VICKEY GAMING - 05.09.2023 04:59

Ot working for me to add enhanced input

Ответить
Pyrocks
Pyrocks - 28.08.2023 00:04

You can go to "Tools > Refresh Visual Studio 2022 Project" to refresh your C++ code if you still have the includes error red lines. Worked for me !

Ответить
Samuel S
Samuel S - 01.08.2023 13:26

Nice tutorial! But I'm being stucked where even though I've followed all the steps (I think?), the function coded in the C++ files attached to the blueprint won't be executed!
Another question : even the Input actions won't appear in the blueprint despite keeping opened the code solution and restarting Unreal Engine.

Do you know how to solve those two issues?

Thank you :)

Ответить
ClubberTime
ClubberTime - 14.07.2023 16:08

What's the benefit of setting this up with c++ as opposed to blueprints?

Ответить
ClubberTime
ClubberTime - 14.07.2023 15:34

Can't find the bird in the starter content

Ответить
Alucard
Alucard - 10.07.2023 23:18

Iv learn so much from this. Thanks dude!

Ответить
Mykola Shevchenko
Mykola Shevchenko - 08.07.2023 23:03

Thanks for videos about Enhanced Input! I subscribed to you.

Ответить
Floden Spira
Floden Spira - 30.06.2023 05:10

Thank you this helped me alot..

Ответить
Reinaldo Palacio
Reinaldo Palacio - 25.06.2023 04:57

I understand easy when topics are explained as you do. Very good . Thanks

Ответить
Sayber2th
Sayber2th - 19.06.2023 16:09

Loving the series! Excited to keep going!

Ответить
Zonespace
Zonespace - 10.06.2023 08:05

Incredibly helpful explanation that teaches everything perfectly!

Ответить
yebut
yebut - 09.06.2023 22:53

For me, deleting files and generating vs files didnt worked, but only generating worked
Always make backups when you deleting something

Ответить
Andrew
Andrew - 07.06.2023 17:42

Thank you for comprehensive explanation!

Ответить
ratbone39
ratbone39 - 26.05.2023 21:17

if I didnt want to use the property modifier 'EditAnywhere' and instead hard code this into the CPP file, would that be possible and if so how?

Ответить
Pumpernickel Gamer
Pumpernickel Gamer - 10.05.2023 00:40

Godly tutorial. Thank you very much!

Ответить
masm32
masm32 - 09.05.2023 14:22

Good tutorial, but to heavy on basic C++ programming. Templates, scope and so on should be known if someone wants to use C++ for Unreal Engine.

Ответить
Grant Wojciechowski
Grant Wojciechowski - 04.05.2023 20:17

I'm following a different tutorial, which had me set up a BasePawn then create a child C++ class from that, if anyone else is running into issues getting this to work using a child class, make sure that you have this in your header file

virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

Was driving me crazy trying to figure out why it was saying that SetupPlayerComponent wasn't declared, this was why.

Ответить
Dino Sauro
Dino Sauro - 17.04.2023 23:15

Nice video! Just one note, CastChecked<> has another advantage: It is converted to static_cast<> in Shipping, resulting in better performance (removing the dynamic cast and checks).
For instance, you may use CastChecked<> in your example also for the APlayerController cast, if you have the design assumption that the pawn cannot be controlled by AI.
Anyway, this is irrelevant outside of methods that are not part of the update/tick loop, there is no benefit on saving on dynamic casts for methods called sporadically.

Ответить
Legend
Legend - 16.04.2023 03:51

This is a must watch for anyone using UE5, Thank you!

Ответить
Maik
Maik - 08.04.2023 00:26

"we cannot forward declare something that is not a pointer."

That is incorrect. Pointers, but also references can be forward declared.

Ответить
James Pedid
James Pedid - 02.04.2023 03:59

What do you do when BindAction doesn't accept the &MyClass::Move method and won't compile because of it?

Ответить
Peter Grundmann
Peter Grundmann - 21.03.2023 15:58

Thanks for this Video. What I'm missing is the way to unbind the action mapping (C++)

Ответить
Dimitry Arsenev
Dimitry Arsenev - 13.03.2023 15:25

In Unity - how use input - answer use if(GetKeyDown). In UE how use input - look we have 3 hours tutorial.

Ответить
Shane1470
Shane1470 - 13.03.2023 08:57

You manage to strike the perfect balance between explaining every necessary detail without making the viewer feel like the video will never end! Kudos!

Ответить
jake juan
jake juan - 10.03.2023 03:23

Do have Just a pure Blueprint class to offer? a 3d artist it is a little bit inconvenient for me to write code

Ответить
Richi Sevela
Richi Sevela - 02.03.2023 14:29

Hey Stephen,
nice video with a comprehensive explanation.

I have one question that's been bugging me: what does CastChecked do?

You said it asserts that the result is not a nullptr. However, I looked at the code in Casts.h and did not find any assertions, like check(Result).
It looks like it uses Cast, then logs error if the result is a nullptr and then just returns the result. So it actually might be a nullptr, right?
Also: if CastChecked result could not be a nullptr, why does the ThirdPersonTemplate code check for it in the SetupPlayerInputComponent function?

I am using UE 5.1.1, maybe something changed here from UE 5.0?

Thanks

Ответить
nothing
nothing - 01.03.2023 21:25

What I need to do if every time I recompile, inputAction (like yours moveAction) resets in blueprint and I need to set again. How to fix that?

Ответить
Fictional Gaming
Fictional Gaming - 26.02.2023 19:34

Little tip for folks if you don't want to type the debug command constantly....open your character blueprint view graph. Bind a key (like 1) to execute the console command showdebug enhanced input

So much better when just doing the debugging than it is typing it out constantly.

Til next time with additional tips!

Ответить
Nicholas Whitley
Nicholas Whitley - 03.02.2023 13:52

Welp, deleting all those folders completely fucked my UE5 project.

Ответить
Christopher Franko
Christopher Franko - 29.01.2023 05:39

One last thing ive learned from this is... almost always, its just easier to use blueprints lol. We set this up in blueprints in like 30 seconds. It took 30 minutes to do it in c++. Whats the benefit of doing it in c++ over just doing it in bp?

Ответить
Christopher Franko
Christopher Franko - 29.01.2023 04:05

Man, adding the new module and then having to delete the intermediate/binary and saved directory isnt super graceful or intuitive.

Ответить
Christopher Franko
Christopher Franko - 29.01.2023 00:52

These 2 hr classes boi.. rough

Ответить
Martin Paradis
Martin Paradis - 23.01.2023 07:32

I am the only one to find weird that you have to add a member InputMappingContext, which already holds an array of InputAction AND add an InputAction member which is supposedly contains inside the context mapping ? It is not your fault, I think there is a missing piece in the InputAction class which is a FGameplayTag. With Tag we could identify which InputAction could be bind to a specific callback. Otherwise, if you had multiple contexts, you absolutely need multiple members of InputAction that are supposed to be in each Contexts. Anyway, It was my late night 2 cents ;)

Ответить
Valère VIANDIER
Valère VIANDIER - 22.01.2023 16:49

Thanks Stephen. I just started you course on Udemy and falling back here for a great explanation about all the enhanced input system. As always, all is really clear 👍

Ответить
Davide Blonda
Davide Blonda - 13.01.2023 14:48

Hei man thankyou so so so much for this tutorial!

Ответить
Beba Bups
Beba Bups - 01.01.2023 21:07

Thank you so much! Love your courses!

Ответить
Roly Poly Games
Roly Poly Games - 28.12.2022 00:38

Thanks for this, just upgraded to 5.1 and noticed the deprecation. New system looks so much easier to do advanced things! Primer in the last video was golden and this is a good walkthrough on converting doesn't seem TOO different in a coding perspective just shorter more sensible names! Less mess is always good!

Ответить
nelson lee
nelson lee - 16.12.2022 19:29

Thank you so much! The delegate functions with FInputActionValue is so new and I didn't know how else to not run into compile errors until I saw your video.

Ответить