Adding a component to a subclass after the component was declared in the parent class results in the component not being editable if a Blueprint had already been created using the subclass. This only occurs when a Hot Reload takes place after the code is added to the subclass' source code.
This was found to be happening in Main up to CL 2408355. After this CL in Main, hot reloading after adding a component no longer worked (see [Link Removed]).
WORKAROUND:
Close the Editor and re-open the project in the Editor.
public: APickup(const FObjectInitializer& ObjectInitializer); protected: UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Ball, meta = (AllowPrivateAccess = "true")) USphereComponent* CollisionSphere; UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Ball, meta = (AllowPrivateAccess = "true")) UStaticMeshComponent* PickupMesh;
APickup::APickup(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { CollisionSphere = ObjectInitializer.CreateDefaultSubobject<USphereComponent>(this, TEXT("CollisionSphere")); RootComponent = CollisionSphere; }
public: AMyPickup(const FObjectInitializer& ObjectInitializer);
AMyPickup::AMyPickup(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
static ConstructorHelpers::FObjectFinder<UStaticMesh> TheMesh(TEXT("/Game/FirstPerson/Meshes/FirstPersonTemplateCube.FirstPersonTemplateCube")); PickupMesh = ObjectInitializer.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh")); PickupMesh->SetStaticMesh(TheMesh.Object); PickupMesh->AttachTo(RootComponent);
RESULT:
The PickupMesh component has been added to the Blueprint, but it is not editable in the Details panel.
EXPECTED:
The PickupMesh component has been added to the Blueprint and is editable in the Details panel.
Why does the REMOVE method of map container remove elements have memory leaks?
How does TextureRenderTarget2D get TArray<uint8> type data?
What is the cause of the packaging error falling back to 'GameUserSettings' in ue5?
How to delete some elements correctly when deleting an array loop?
How do I set a material as a post-processing material?
What is the difference between Camera and CineCamera?
UMG RichText not appear image when packaged
How does TArray loop correctly remove elements in blueprints?
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Fix Commit | 2517610 |
---|
Created | Jan 29, 2015 |
---|---|
Resolved | Apr 20, 2015 |
Updated | Jul 14, 2021 |