When a struct is created in the header file for a class, and the struct contains a member that is of that class' type, performing a hot reload after changing the class will result in a Blueprint derived from that class and using that struct having compile errors. The errors can be resolved by closing and re-opening the Editor.
class AMyActor; USTRUCT(BlueprintType) struct FActionData { GENERATED_USTRUCT_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Data") FVector Point; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Data") AMyActor* Unit; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Action Data") AActor* Actor; };
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "TestCat")
FActionData TheData;
RESULTS:
The build completes successfully, but the Blueprint's Event Graph now looks like the Broken.png image.
EXPECTED:
The build completes successfully and the Blueprint has no errors.
WORKAROUND:
Close and re-open the project in the Editor.
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
How does TextureRenderTarget2D get TArray<uint8> type data?
How to delete some elements correctly when deleting an array loop?
UMG RichText not appear image when packaged
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
Head over to the existing Questions & Answers thread and let us know what's up.
5 |
Component | UE - Gameplay - Blueprint |
---|---|
Affects Versions | 4.8.3, 4.9.1, 4.11 |
Created | Sep 16, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |