0 like 0 dislike
33 views

Hi, I am struggling to create an emitter component so that it shows up and is editable in my Blueprint. I can see the component attached in the right place in my hierarchy but it has no visible attributes. It seams the UE4 CreateDefaultSubObject doesn't work for PopcornFX. Is there another way to spawn in or will I have to spawn them on begin play and set the component reference to the newly spawned emitter?

Here's some code:

 PlayerDash_FX = CreateDefaultSubobject<UPopcornFXEmitterComponent>(TEXT("Player Dash FX"));

 PlayerDash_FX->AttachToComponent(Head, FAttachmentTransformRules::KeepRelativeTransform);

 PlayerDash_FX->RelativeScale3D = FVector(0.34375, 0.34375, 0.34375);

I would prefer to be able to create like other UE4 components so myself or others can edit values in the Blueprint scene.

asked by HarryHighDef (120 points)
Hi,
Did you SetEffect() on this emitter component ? It needs to know which Effect to get its behaviour from ? If this still doesn't work I'll look into it
I did not yet because I wanted to set it in the BP. My problem is the component shows no details like one that is created in BP does. I can't set the emitter and it doesn't seem to actually exist when the game is run.
Here is how we create the emitter component in the APopcornFXEmitter's constructor:

    PopcornFXEmitterComponent = CreateDefaultSubobject<UPopcornFXEmitterComponent>(TEXT("PopcornFXEmitterComponent_Default"));
    RootComponent = PopcornFXEmitterComponent;

So pretty much the same thing as what you seem to do, can you attach a screenshot of how it looks like in BP ?
https://gyazo.com/6b8f0378795e5450e1293cfb4c7a3bd6
https://gyazo.com/b30d48acbe0f3fe9480e7dcd8030e95c

First image is it in the hierarchy of the BP and selected
Second image is what the details panel for the component shows when it is selected.
Hi,
I managed to reproduce on my end, and had the "VisibleAnywhere" meta missing, adding it fixed the problem:

    UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category=PopcornFX)
    class UPopcornFXEmitterComponent    *PopcornFXEmitterComponent;

Do you have this meta specified for the emitter component property ?
I have the EditAnywhere tag included. From my understanding that should have the same effect as VisibleAnywhere but allow for some more editing.
I'll swap them later and see what effect it has on my end.

Please log in or register to answer this question.

...