We have a blueprint based off of a C++ class that derives from the APawn class. This C++ class has a static mesh component which is created using the CreateDefaultSubobject function in the constructor, it is then set as the root component. We commonly have multiple child blueprints of this pawn blueprint as well. While at first it appeared that using Hot Reload or Live Coding was causing this issue, that was proven to be false. Seemingly at random (there are no obvious indications from the engine) the blueprint will corrupt, causing the “Details” panel for the root component will appear completely blank. The pawn can still be used when place into the level from the editor but if spawned from blueprint during play, will cause a crash due to certain other child components being unable to reference the root component. The child blueprints that exist of this main pawn blueprint typically do not show this same blank “Details” panel when selecting their root component and function completely fine. The only solution we’ve found for this issue is completely remaking the original parent blueprint and then having to re-parent the old child blueprints.
Steps to Reproduce
There has been no clear indication for how to reproduce this issue.
Hello [mention removed],
I have found reports of similar behavior in versions older than UE 5.3, though caused by different factors.
Could you share the C++ code where the Body component is created in your Pawn? Additionally, can you confirm if this has problem has only occured for you in UE 5.3?
Best regards,
Francisco
[Image Removed]
From my recollection, this has only been in 5.3
Though, we haven’t used any other engine versions.
Hello [mention removed],
Thanks for the prompt reply, what UPROPERTY specifiers are used for the Body component?
Best,
Francisco
Hi [mention removed],
EditAnywhere, BlueprintReadWrite
These are the UPROPERTY specifiers on the Body component.
Hello [mention removed],
Thanks for the info. I’d like to highlight a few best practices that may help avoid this type of issue.
First, a cleaner and safer way to set the RootComponent is to use the SetRootComponent() method provided by AActor, rather than assigning the pointer directly. Also, it’s best to avoid using EditAnywhere/BlueprintReadWrite on your Body component unless you intend to replace the component pointer during gameplay. If the reference is not expected to change, using VisibleAnywhere/BlueprintReadOnly is the safer choice.
Since there’s no known repro for your case, I looked into similar cases reported by other users.
The most common cause appears to be compiling with Live Coding after modifying native components used in BP classes.
For reference: Changing component types causes corrupted BP - #28 by vebski
This issue has been reported as far back as 2015 and is still reproducible in UE 5.3 based on my tests. If you change the class of your native component (ie: Body) in source code and compile via Live Coding, the BP will become corrupted and you the Details tab will be empty. This is very similar to the issue you’re facing.
In this case, it’s recommended to avoid using Live Coding after changes made to constructors, since it doesn’t fully update Blueprint instances or component hierarchies. If this issue occurs, the typical fix is to close the editor, compile from IDE and relaunch the project.
There’s also a community post that expands on this topic: https://dev.epicgames.com/community/learning/knowledge\-base/jP5O/unreal\-engine\-hot\-reload\-on\-native\-actor\-component\-can\-lead\-to\-blueprint\-corruption\-and\-data\-loss
Let me know if this helps your case.
Best,
Francisco