Custom movement component is always null

Branch: Binary
Build: 4.2

Detailed information:

When adding a custom movement component, the component is always null after being returned from SpawnActor. The component itself is loaded and initialised, but the reference is lost when passing back up the constructor call stack.

More detail + debugging here - Adding custom movement component - C++ - Unreal Engine Forums

Steps to reproduce:

Create an empty project from the c++ shooter
Create a new c++ file that subclasses CharacterMovementComponent

Change the Character.cpp file to use the new movement component (example here - A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums)

Build + Run the game, start playing and then try and move. You cant because the component has been NULLed

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.

If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.

Thank you

Its still happening in 4.20.
I successfully added C++ custom class, shown in editor, spawned correctly ingame, but blueprints try use GetMovementComponent() node get None as return.

This is also happening for me in 4.22.2 and I set it up just like Rama’s tutorial:

I think you’ll need to report this as a new bug. This one is marked as answered so they probably won’t look at it again