Reorder variable Categories in Class Defaults

Meta??? Space-separated list?

The only occurrences I find in the engine of “PrioritizeCategories” are these :

  • Material.h (Comma separated, no meta, quoted)
UCLASS(hidecategories=Object, MinimalAPI, BlueprintType, PrioritizeCategories = ("Material", "Nanite", "Translucency", "TranslucencySelfShadowing", "Refraction", "WorldPositionOffset", "PostProcessMaterial",  "Mobile", "ForwardShading", "PhysicalMaterial", "PhysicalMaterialMask", "Usage", "Lightmass", "Previewing", "ImportSettings"))
  • interchangeImportTestPlan.h (No meta, no quotes and judging from the comment I’d say it’s not working for them either):
UCLASS(BlueprintType, EditInlineNew, PrioritizeCategories = Definition) // @TODO: can't find a way to force Run to be below Definition

However I’m testing it in 5.5 and 5.7 and it doesen’t work in any way, with or without “meta” and quotes

1 Like

For future travelers, putting PrioritizeCategories directly in the UCLASS instead of meta did work for me in 5.7.4 with a few caveats:

  1. Including any category that does not contain an editable UPROPERTY seems to break it for all categories, even if the category exists and is used for other things like UFUNCTIONS.
  2. ActorTick and ComponentTick categories still sort near the top, and ComponentTick showed up in the middle of my prioritized categories for some reason :melting_face:

Still, it is better than nothing. Hope this helps.

Ex:
UCLASS(PrioritizeCategories=(Category1, Category2, Category3))
class EXAMPLE_API AExampleClass : public AActor

3 Likes