[C++] Hide category of UPROPERTY

Good day!

I have a class with an array:

UPROPERTY(EditAnywhere, Instanced, BlueprintReadOnly, Category = "Quest system")
TArray<class UMyQuestTask*> Tasks;

In UMyQuestTask I have these variables:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quest system")
FString Name;

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Quest system")
FString Description;

I want to hide Category in Editor, 'cause it’s looks a bit messy:

Deleting category not works, instead of “Quest system” are shown “UMyQuestTask”
How can I hide category?

How are you planning on setting the name and description if there were a way to hide the uparameters on an instanced class?

If there’s some logic somewhere else which sets them on the instance, I’d set the Name and Description UProperties to EditInstanceOnly or VisibleInstanceOnly instead of EditAnywhere.

If you’re creating a new BP for every quest task, and therefore need these properties set in defaults, then you probably don’t need the tasks array to be instanced. If there is data on the task that is set per-instance, I’d break the quest task class up into two classes, one which is global, unchanging data, and one which is just the instance data, and point the instance data at the global data one. (So, for example, the instance would have completion states, but the quest name and description would be somewhere else which is shared by all instances of that quest. It doesn’t make sense to store the quest’s name uniquely if you have multiple people on that quest.)

Finally, if you just want to get them out of the way, I’d just add the AdvancedDisplay specifier to the Name and Description properties so they’re hidden behind a rollout.

At the top of your .h file where its say

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent))

you need to add a string to the end of it like this

UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent), hidecategories = (“Physics”))

Still no way to hide the category?
We just want to hide the Category header, not the contents.

1 Like

Not sure if it was available when this question was first asked, but for the sake of developers ending up here via google, you can omit the category rollouts and only show the properties using the CollapseCategories UCLASS specifier on your EditInlineNew class.

UCLASS(Blueprintable, BlueprintType, EditInlineNew, CollapseCategories)
class UMyQuestTask
...
3 Likes

Can’t thank you enough, if you ever come to Brazil, let me know and I’ll buy you a few beers.