Child component variables not visible in instance - my solution

I’m not sure if this has been mentioned before, but I ran into the issue where I have a component which derives from another component. When I added variables in the child class, I could not for the life of me get them to be visible in an instance of the actor/component in the word.

What seemed to be the problem was the categories. For example. In my Parent component I have this:


/*LogicComponent to Trigger*/
UPROPERTY(EditAnywhere, Category = Output)
FPBLogicComponentReference LogicComponentToTrigger;

And in my Child class I originally had this:


/**If True, only specifc actors can trigger. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Trigger", meta = (ExposeFunctionCategories = "Trigger", AllowPrivateAccess = "true"))
bool bTriggerWithSpecificActors;

The solution for me was to change the category from “Trigger” to “Output” IE:


    /**If True, only specifc actors can trigger. */
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Output", meta = (ExposeFunctionCategories = "Output", AllowPrivateAccess = "true"))
    bool bTriggerWithSpecificActors;


I’m not sure why this worked - I tried introducing the Category “Trigger” in the parent class, but it still failed to expose. Anyway, if you’re having trouble - try changing the category to “Output”. Hope this helps someone else!

Looking further into it, I managed to get the Trigger category to show up by doing this:


UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent), Blueprintable, ShowCategories = (Trigger))

and this:



    /**If True, only specifc actors can trigger. */
    UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Trigger)
    bool bTriggerWithSpecificActors;