Hey, I’m trying to figure out how on earth to solve this gracefully -
I need to replace a Native Component with a Blueprint derived class.
Lets say we have:
UCLASS()
class Foo : public AActor {
...
UPROPERTY(EditAnywhere)
UBarComponent* ReplaceableComponent;
...
public Foo() {
ReplaceableComponent = CreateDefaultSubobject< UBarComponent>(
TEXT( "ReplaceableComponent" ) );
}
}
Now, if I blueprint my class Foo, in the left hand pane, I can see my Native Component registered.
But I want to replace this instance, for this blueprint only.
Say I have created another Blueprint based off of UBarComponent called BP_MyBarComponent.
The blueprint editor will not let me replace “ReplaceableComponent” with an instance of BP_MyBarComponent.
Has anyone figured out how to deal with this?
I tried setting the property to BlueprintReadWrite, and granting EditInlineNew to the component base class.
This allows me to set it via the blueprint variables in the editor, but when I compile it gets set to null again.