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.
I am not able to find world outliner how to enable it?
How can i modify the param name in EQS node
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Hey, why do i get this when i snap two similar meshes together?
Trying to launch , erorr,dll missing
Why doesn't the collision diminish when the collision radius decreases?
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 |