UActorComponents don't currently allow subobjects that are UActorComponents. However, this also prevents them from having "normal" instanced UObjects.
The UObjects can be added to an ActorComponent, but they aren't properly serialized / deserialized. This causes issues in the editor where, when the object is modified through the details panel, it will immediately revert to it's default value from the CDO (which is nullptr / None unless the object is created in code).
Expected: The property is changed.
Actual: The property will be reset to None.
UCLASS(EditInlineNew) class QAGAME_API UTestProperty : public UObject { GENERATED_BODY() public: UTestProperty() { } UPROPERTY(EditAnywhere) int32 value; }; UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) class QAGAME_API UQAMyActorComponent_Temp : public UActorComponent { GENERATED_BODY() public: // Sets default values for this component's properties UQAMyActorComponent_Temp() { } UPROPERTY(EditAnywhere, Instanced) UTestProperty* Property; };
How does TextureRenderTarget2D get TArray<uint8> type data?
Why does the REMOVE method of map container remove elements have memory leaks?
How do I set a material as a post-processing material?
UMG RichText not appear image when packaged
What is the difference between Camera and CineCamera?
How does TArray loop correctly remove elements in blueprints?
How to assign a value to a member of UMG's UMaterialInterface pointer type in C++?
Why does UV setting float2(1,1) display incorrectly in the material's custom node?
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-42066 in the post.
0 |
Component | UE - Gameplay - Components |
---|---|
Affects Versions | 4.14, 4.15 |
Target Fix | 4.17 |
Fix Commit | 3386615 |
---|---|
Main Commit | 3431398 |
Created | Feb 16, 2017 |
---|---|
Resolved | Apr 10, 2017 |
Updated | Dec 13, 2018 |