UME_CharacterCollisionComponent derives from UCapsuleComponent
UME_CharacterMovementComponent derives from UCharacterMovementComponent
I’m not sure what you mean by ‘inside the constructor’ ? As far as I was aware, the only way to use the SetDefaultSubObjectClass() method was in the way I did it there. Anywhere else in the constructor gives me a compile error - “Subobject class setup is only allowed in base class constructor call (in the initialization list)”
When this is added to my custom character class (MyCharacter.h), the blueprint based on the class updates the component that is being used appropriately.
The blueprint shows that the correct class is assigned to ‘CharacterMovement’ (my child movement component), but it is not creating an instance of that component class
Here is the result when I create an entirely new blueprint based on the same parent class as the above old blueprint. As you can see, an instance of the movement component was created and the properties are available.
Can you provide the rest of your custom character movement class? The class I tested with was empty other than default boilerplate code and the details panel is fully accessable.
Additionally, can you try creating a new, empty CharacterMovementComponent class and use that instead and let me know if you get the same results.
The only thing I can think of that might have caused this, is that I am using class redirects ( I renamed the character movement class, and redirected from what it was previously called).
I don’t know if that’s helpful information or what, but at this point I think I’m just gonna recreate the blueprint and move on
As a rule of thumb, I generally avoid putting too much work into blueprints and try to keep most of my code and properties C++ side. Occurrences like these kind of hammer home the logic in that.
Hi, I just had this happen to me on 4.13.2 when I changed from UHierarchicalInstancedStaticMeshComponent to UInstancedStaticMeshComponent. BP that used this component are corrupted and need to be recreated.
yep. I needed to change my component classes for my cars. Each car is composed from like hundred of parts. Now my project can be binned, because I am UNABLE to switch component class in C++. Amazing…
edit: managed to fix it, in my case i just needed to override the serialize method and use the parent serialization function call (UPrimitiveComponent::Serialize)