Download

Crash when trying to add custom movement component

Hey so I’ve been trying to add a custom movement component for hours now and when I build in visual studio it always succeeds but when I go on the editor it crashes instantly.
Here’s the code I’m using to set it:


AInheritedCharacter::AInheritedCharacter(const FObjectInitializer & ObjectInitializer)
: ABaseCharacter(ObjectInitializer)
{
Super(ObjectInitializer.SetDefaultSubobjectClass<UCustomCharacterMovement>(ACharacter::CharacterMovementComponentName));
}


Can someone please tell what I’m doing wrong, thank you :slight_smile: