Hello,
Adding/suppressing components in C++ seems to corrupt the blueprint inheriting from the C++ class.
To obtain the herebelow screenshot, i did the following.
-
create a class inheriting from AActor
-
add some components in it (among them, a UStaticMeshComponent)
-
create some blueprints from this class (editor, runtime, run game a few times)
-
then add a UTextRenderComponent
-
use the blueprints
-
then supress the UTextRenderComponent
-
i’m in the following state:
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Yag)
UStaticMeshComponent* SeeMeSphere;//UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = Yag)
// UTextRenderComponent* TextComponent;
The problem is that adding/deleting the UTextRenderComponent seem to have corrupted the UStaticMeshComponent.
I have a lot of other components that behave well, so it might be important that the UTextRenderComponent is placed right after the UStaticMeshComponent.
Anyway, in the following screenshot:
The BP on top is an old BP (created before messing with the UTextRenderComponent), you can see that the UStaticMeshComponent detail panel is empty.
The BP on bottom is a freshly created BP (after messing with the UTRC) and you can see it’s correct (detail panel OK).
In addition, whenever i place an old BP in game, as soon as i try to access the UStaticMeshComponent, i get a crash.
So the UStaticMeshComponent (which, to be clear, i never touched in code) seems to exist and not exist at the same time: it shows in the editor with the correct mesh in the preview panel, but an empty detail panel, and is not accessible in game.
I tried to delete the Saved directory hoping to clean some cache, tried to move the BP back and forth in some other dir (a workaround that worked very well in a somewhat similar issue), but no luck so far.
I sure could recreate all my old BP but that wouldn’t really solve the problem, and moreover i have 150+ of them and this means 2 days of stupid repetitive work, so if i could just fix them one way or another, i would be very happy
Thanks
Cedric