When a blueprint class that contains an instanced property is used as the class for a child actor template, recompiling that class results in a disconnect between the instanced subobject in the blueprint class and the subobject in the template.
Add the following classes to a project.
UCLASS(BlueprintType, DefaultToInstanced, editinlinenew, hidecategories = Object) class UCustomClassA : public UObject { GENERATED_BODY() public: UPROPERTY(EditAnywhere) float MyVariable = 0.f; }; UCLASS(Blueprintable) class ACustomClassB : public AActor { GENERATED_BODY() public: UPROPERTY(EditAnywhere, Instanced) UCustomClassA* MyClassInstance; };
Create two blueprints:
BP_ClassB, a BP from ACustomClassB
BP_WithClassB, an actor BP with BP_ClassB as a Child Actor
In BP_ClassB select CustomClassA for the instanced property type.
Initially you'll note that changing the value inside CustomClassA is reflected in to the subobject in the child actor template.
Hit compile on BP_ClassB and note that changing that value no longer updates the value inside the child actor template.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-148570 in the post.
1 |
Component | UE - Gameplay - Blueprint Compiler |
---|---|
Affects Versions | 5.0 |
Target Fix | 5.1 |
Created | Apr 7, 2022 |
---|---|
Resolved | Apr 25, 2022 |
Updated | May 6, 2022 |