Changing component types causes corrupted BP

I have a custom character subclass with its own movement component. I am using the ‘SetDefaultSubobjectClass’ method in the constructor to assign my movement component class to the pawn in lieu of the default one. As you can see, I am doing the same with the Capsule component. The capsule component assignment works correctly, but the movement component, does not. The code compiles, but when I open any blueprint deriveded from my custom character, the movement component appears as ‘None’.

Unfortunately the workaround of using the ‘EditAnywhere’ specifier doesn’t help me , because the CharacterMovement UProperty is defined in Character, which is an engine class and I’d prefer not to change engine headers if it all possible.

1 Like