Note: This page is still a work in progress. There are a lot of meta specifiers still to document!
Unreal's Class Specifiers and Class Metadata Specifiers pages list all of the core specifiers and many of the metadata specifiers, but it is not an exhaustive list.
This page attempts to be an exhaustive list of all the UCLASS
specifiers, giving explanations, sample code, screenshots and related links for each.
If you know of any not listed here, or see any mistakes, feel free to contact me.
Special thanks to Erekose Craft, Ben Fox, Aquanox, ATankNoMore for finding meta properties, giving feedback and giving great examples of usage.
The YAML files used to generate this documentation are available on GitHub. Feel free to submit pull requests or submit any incorrect or missing information there.
General Points
- Tags are case insensitive, but I would recommend sticking to the case example here for readability.
- Quotation marks are optional if the values does not have spaces. e.g.
someBool=true
is treated the same assomeBool="true"
. Again, for readability I would recommend using quotation marks only around string-type properties.
Display
Advanced Class Display
Position:
Main
Type:
flag
Related:
UCLASS(AdvancedClassDisplay)
The AdvancedClassDisplay Specifier forces all properties of the class to show only in the advanced sections of any details panel where they appear. To override this on an individual property, use the SimpleDisplay specifier on that property.
Class Group
Position:
Main
Type:
string
UCLASS(ClassGroup="abc")
Class Group must be something already registered, you can't put arbitrary strings in here.
Seems to be only used for the Add Component button within an actor.
Indicates that Unreal Editor's Actor Browser should include this class and any subclass of this class within the specified GroupName when Group View is enabled in the Actor Browser.
UCLASS(ClassGroup="Animation")
class UMyActorComponent : public UActorComponent
{
GENERATED_BODY()
};
Auto Collapse Categories
Position:
Main
Type:
string (Space-separated list)
Incompatible with:
Opposite:
UCLASS(AutoCollapseCategories="abc")
The AutoCollapseCategories Specifier negates the effects, for the listed categories, of the AutoExpandCategories Specifier on a parent class.
Dont Auto Collapse Categories
UCLASS(DontAutoCollapseCategories="abc")
Negates the AutoCollapseCategories Specifier for the listed categories inherited from a parent class.
Auto Expand Categories
UCLASS(AutoExpandCategories="abc")
Specifies one or more categories that should be automatically expanded in the Unreal Editor Property window for Objects of this class. To auto-expand variables declared with no category, use the name of the class which declares the variable.
Collapse Categories
UCLASS(CollapseCategories)
Indicates that properties of this class should not be grouped in categories in Unreal Editor Property windows. This Specifier is propagated to child classes, and can be overridden by the DontCollapseCategories Specifier.
Dont Collapse Categories
UCLASS(DontCollapseCategories)
Negates a CollapseCatogories Specifier inherited from a base class.
Ignore Category Keywords In Subclasses
Position:
Meta
Type:
flag
Related:
UCLASS(meta=(IgnoreCategoryKeywordsInSubclasses))
A child that subclasses a class with this meta tag will ignore the following specifiers in the parent: ShowCategories
, HideCategories
, AutoExpandCategories
, AutoCollapseCategories
and PrioritizeCategories
.
Only used in one place in the codebase. ComponentWrapperClass
is an odd alias for it.
Used to make the first subclass of a class ignore all inherited ShowCategories and HideCategories Specifiers.
Tool Tip
Position:
Meta
Type:
string
Related:
UCLASS(meta=(ToolTip="abc"))
TODO Look into how this is different to ShortToolTip
Overrides the automatically generated tooltip from code comments.
Short Tool Tip
Position:
Meta
Type:
string
Related:
UCLASS(meta=(ShortToolTip="abc"))
TODO Look into how this is different to ToolTip
A short tooltip that is used in some contexts where the full tooltip might be overwhelming, such as the Parent Class Picker dialog.
UCLASS(meta=(ShortTooltip="A layout panel for automatically laying child widgets out vertically"))
class UMG_API UVerticalBox : public UPanelWidget
Prioritize Categories
Position:
Meta
Type:
string (Space-separated category names)
Related:
UCLASS(meta=(PrioritizeCategories="abc"))
Only seems to be used in one place in the source, UCommonTextBlock
. Seems to cause the specified categories to be shown first. Note that the category names are space separated, not comma-separated.
UCLASS(Config = CommonUI, DefaultConfig, ClassGroup = UI, meta = (Category = "Common UI", DisplayName = "Common Text", PrioritizeCategories = "Content"))
class COMMONUI_API UCommonTextBlock : public UTextBlock
Deprecated Node
Position:
Meta
Type:
flag
UCLASS(meta=(DeprecatedNode))
For behavior tree nodes, indicates that the class is deprecated and will display a warning when compiled.
Deprecation Message
Position:
Meta
Type:
string
UCLASS(meta=(DeprecationMessage="abc"))
Deprecated classes with this metadata will include this text with the standard deprecation warning that Blueprint Scripts generate during compilation.
Display Name
Position:
Meta
Type:
string
UCLASS(meta=(DisplayName="abc"))
The name of this node in a Blueprint Script will be replaced with the value provided here, instead of the code-generated name.
Blueprint
Abstract
Position:
Main
Type:
flag
UCLASS(Abstract)
The Abstract Specifier declares the class as an "abstract base class", preventing the user from adding Actors of this class to Levels. This is useful for classes which are not meaningful on their own. For example, the ATriggerBase base class is abstract, while the ATriggerBox subclass is not abstract and can be placed in a Level.
// I am abstract, you can't instantiate me!
UCLASS(Abstract)
class UAnimalBase : public UObject
{
GENERATED_BODY()
public:
UAnimalBase(const FObjectInitializer& ObjectInitializer);
};
Blueprintable
UCLASS(Blueprintable)
Exposes this class as an acceptable base class for creating Blueprints. The default is NotBlueprintable, unless inherited otherwise. This Specifier is inherited by subclasses.
Not Blueprintable
UCLASS(NotBlueprintable)
Specifies that this class is not an acceptable base class for creating Blueprints. This is the default and is inherited by subclasses.
Is Blueprint Base
Position:
Meta
Type:
bool
Related:
UCLASS(meta=(IsBlueprintBase=true))
Is much less frequently used than Blueprintable
and NotBlueprintable
. I would stick to those.
States that this class is (or is not) an acceptable base class for creating Blueprints, similar to the Blueprintable or 'NotBlueprintable' Specifiers.
Blueprint Type
UCLASS(BlueprintType)
Exposes this class as a type that can be used for variables in Blueprints.
UCLASS(BlueprintType)
class UExampleObject : public UObject
Not Blueprint Type
UCLASS(NotBlueprintType)
Prevents this class from being used for variables in blueprints
UCLASS(NotBlueprintType)
class UExampleObject : public UObject
Const
Position:
Main
Type:
flag
Related:
UCLASS(Const)
Not entirely sure what difference this makes or when to use it.
All properties and functions in this class are const and are exported as const. This Specifier is inherited by subclasses.
Blueprint Spawnable Component
Position:
Meta
Type:
flag
UCLASS(meta=(BlueprintSpawnableComponent))
Adding this means that the component will appear under the "Add" dropdown for adding components to an Actor.
If present, the component Class can be spawned by a Blueprint.
Blueprint Thread Safe
Position:
Meta
Type:
flag
UCLASS(meta=(BlueprintThreadSafe))
Only valid on Blueprint function libraries. This specifier marks the functions in this class as callable on non-game threads in animation Blueprints.
Show World Context Pin
Position:
Meta
Type:
flag
UCLASS(meta=(ShowWorldContextPin))
Indicates that Blueprint nodes placed in graphs owned by this class must show their World context pins, even if they are normally hidden, because Objects of this class cannot be used as World context.
Dont Use Generic Spawn Object
Position:
Meta
Type:
bool
UCLASS(meta=(DontUseGenericSpawnObject=true))
Only used in two places in the engine, on UUserWidget
and DragDropOperation
. TODO is it bool or flag?
Do not spawn an Object of the class using Generic Create Object node in Blueprint Scripts; this specifier applies only to Blueprint-type classes that are neither Actors nor Actor Components.
UCLASS(Abstract, editinlinenew, BlueprintType, Blueprintable, meta=( DontUseGenericSpawnObject="True", DisableNativeTick) )
class UMG_API UUserWidget : public UWidget, public INamedSlotInterface
Kismet Hide Overrides
Position:
Meta
Type:
string (Comma-separated list)
UCLASS(meta=(KismetHideOverrides="abc"))
List of Blueprint events that are not allowed to be overridden.
UCLASS(meta=(KismetHideOverrides="ReceiveAnyDamage,ReceivePointDamage"))
class ENGINE_API ALevelScriptActor : public AActor
Exposed Async Proxy
Position:
Meta
Type:
string (Class name without prefix)
UCLASS(meta=(ExposedAsyncProxy="abc"))
Values in the engine include AsyncTaskRef, AsyncAction, AsyncTask. "The ExposedAsyncProxy metadata specifies the blueprint node will return this object for later canceling."
Expose a proxy Object of this class in Async Task nodes.
UCLASS(Abstract, meta = (ExposedAsyncProxy = AsyncAction))
class GAMEPLAYABILITIES_API UAbilityAsync : public UBlueprintAsyncActionBase
Has Dedicated Async Node
Position:
Meta
Type:
flag
Related:
UCLASS(meta=(HasDedicatedAsyncNode))
If this is present then the editor will not create an async node in the graph.
Config
Config
Position:
Main
Type:
string
UCLASS(Config="abc")
Indicates that this class is allowed to store data in a configuration file (.ini). If there are any class properties declared with the config or globalconfig Specifiers, this Specifier causes those properties to be stored in the named configuration file. This Specifier is propagated to all child classes and cannot be negated, but child classes can change the config file by re-declaring the config Specifier and providing a different ConfigName. Common ConfigName values are "Engine", "Editor", "Input", and "Game".
Default Config
UCLASS(DefaultConfig)
Save object config only to Default INIs, never to local INIs.
Per Object Config
UCLASS(PerObjectConfig)
Configuration information for this class will be stored per Object, where each object has a section in the .ini file named after the Object in the format [ObjectName ClassName]. This Specifier is propagated to child classes.
Config Do Not Check Defaults
UCLASS(ConfigDoNotCheckDefaults)
Global User Config
UCLASS(GlobalUserConfig)
Project User Config
UCLASS(ProjectUserConfig)
Editor
Edit Inline New
UCLASS(EditInlineNew)
Indicates that Objects of this class can be created from the Unreal Editor Property window, as opposed to being referenced from an existing Asset. The default behavior is that only references to existing Objects may be assigned through the Property window). This Specifier is propagated to all child classes; child classes can override this with the NotEditInlineNew Specifier.
Not Edit Inline New
UCLASS(NotEditInlineNew)
Default To Instanced
Position:
Main
Type:
flag
Related:
UCLASS(DefaultToInstanced)
All instances of this class are considered "instanced". Instanced classes (components) are duplicated upon construction. This Specifier is inherited by subclasses.
Visibility
Hidden
Position:
Main
Type:
flag
Related:
UCLASS(Hidden)
The UCLASS specifier now takes a Hidden flag. This maps directly to the ClassFlags Enum CLASS_Hidden flag. Adding this flag will hide the given class from any class browser in the editor.
Hide Dropdown
Position:
Main
Type:
flag
Related:
UCLASS(HideDropdown)
Prevents this class from showing up in property window combo boxes.
Show Functions
UCLASS(ShowFunctions="abc")
This makes more sense when you first understand HideFunctions
. I think it works to re-expose functions that were previously hidden using HideFunctions
.
Shows all functions within the listed categories in a property viewer.
UCLASS(ShowFunctions=FunctionName)
UCLASS(ShowFunctions=(Category1, Category2))
Hide Functions
UCLASS(HideFunctions="abc")
Say you have a class UCameraComponent
, and within it you define a BlueprintCallable
function SetFieldOfView
. Next, imagine you are creating an orthographic camera class that is a subclass of UCameraComponent
. SetFieldOfView
no loner makes sense in this new child class, so to hide it you add HideFunctions="SetFieldOfView"
to its UCLASS()
. According to the documentation you can specify either category names or individual functions. There is only one example of this being used in the engine, interestingly. Ok maybe it's not that interesting.
Hides all functions in the specified category from the user entirely.
UCLASS()
class UCameraComponent : public USceneComponent
{
UFUNCTION(BlueprintCallable)
virtual void SetFieldOfView(float InFieldOfView);
};
UCLASS(HideFunctions=(SetFieldOfView))
class UOrthographicCameraComponent : public UCameraComponent
{
// ...
};
Show Categories
UCLASS(ShowCategories="abc")
Negates a HideCategories Specifier (inherited from a base class) for the listed categories.
Hide Categories
UCLASS(HideCategories="abc")
Lists one or more categories that should be hidden from the user entirely. To hide properties declared with no category, use the name of the class which declares the variable. This Specifier is propagated to child classes.
Prohibited Interfaces
Position:
Meta
Type:
string
UCLASS(meta=(ProhibitedInterfaces="abc"))
Not found any examples of this being used in the engine.
Lists Interfaces that are not compatible with the class.
Restricted To Classes
Position:
Meta
Type:
string
UCLASS(meta=(RestrictedToClasses="abc"))
Blueprint function library classes can use this to restrict usage to the classes named in the list.
UCLASS(meta=(RestrictedToClasses="BTNode"))
class AIMODULE_API UBTFunctionLibrary : public UBlueprintFunctionLibrary
Actor
Placeable
Position:
Main
Type:
flag
UCLASS(Placeable)
I'm pretty sure this is on all AActor
subclasses by default. I guess you could specify its opposite NotPlaceable
if you wanted a non-placeable actor. See NotPlaceable
for use cases.
Indicates that this class can be created in the Editor and placed into a level, UI scene, or Blueprint (depending on the class type). This flag is propagated to all child classes; child classes can override this flag using the NotPlaceable Specifier.
Not Placeable
UCLASS(NotPlaceable)
"This is used in a lot of places in the engine: on test classes, debug actors, gizmos, actors that should only be spawned by other actors."
Negates a Placeable Specifier inherited from a base class. Indicates that Objects of this class may not be placed into a Level, UI scene, or Blueprint in the Editor.
Component Wrapper Class
Position:
Main
Type:
flag
Related:
UCLASS(ComponentWrapperClass)
From what I can tell, this is effectively an alias for IgnoreCategoryKeywordsInSubclasses=true
. A class with this specifier will cause the engine to add the IgnoreCategoryKeywordsInSubclasses
metadata. This in turn causes all subclasses ignore ShowCategories
, HideCategories
, AutoExpandCategories
, AutoCollapseCategories
and PrioritizeCategories
.
Seems to be used on minimal-ish Actors that wrap components. For example on ALight
that wraps ULightComponent
, ASkeletalMeshActor
that wraps USkeletalMeshComponent
.
Co-occurs with ConversionRoot
and ChildCanTick
a lot.
Child Can Tick
UCLASS(meta=(ChildCanTick))
Used for Actor and Component classes. If the native class cannot tick, Blueprint-generated classes based this Actor or Component can have the bCanEverTick flag overridden, even if bCanBlueprintsTickByDefault is false.
Child Cannot Tick
UCLASS(meta=(ChildCannotTick))
Used for Actor and Component classes. If the native class cannot tick, Blueprint-generated classes based this Actor or Component can never tick, even if bCanBlueprintsTickByDefault is true.
Serialization
Transient
UCLASS(Transient)
Objects belonging to this class will never be saved to disk. This is useful in conjunction with certain kinds of native classes which are non-persistent by nature, such as players or windows. This Specifier is propagated to child classes, but can be overridden by the NonTransient Specifier.
Non Transient
UCLASS(NonTransient)
Negates a Transient Specifier inherited from a base class.
Deprecated
Position:
Main
Type:
flag
UCLASS(Deprecated)
This class is deprecated and Objects of this class will not be saved when serializing. This Specifier is inherited by subclasses.
C++
Minimal A P I
Position:
Main
Type:
flag
UCLASS(MinimalAPI)
I find it a bit tricky to understand MinimalAPI. If you have a class that exists in one module and you want to be able to cast to it in another module, I add MinimalAPI.
In ascending order of "how much gets exported" I think of it like this:
- No class specifiers, no
API
macros: nothing exported, the class and its functions are only available within its own module. UCLASS(MinimalAPI)
, noAPI
macros: the class can beCast<T>
to outside of its module, nothing else.MYMODULE_API
on certain functions: only those functions can be called outside of its module.MYMODULE_API
on the class itself: all functions can be called outside of its module.
In general it's good practice to only mark the bare minimum with MYMODULE_API.
Causes only the class's type information to be exported for use by other modules. The class can be cast to, but the functions of the class cannot be called (with the exception of inline methods). This improves compile times by not exporting everything for classes that do not need all of their functions accessible in other modules.
// For example we have a class in MyGameplayModule that we want to be able to cast to elsewhere
// Note we do *not* add MYGAMEPLAYMODULE_API
UCLASS(MinimalAPI)
class ASomeGameplayClass : public AActor
Depends On
Position:
Main
Type:
string (comma-separated)
UCLASS(DependsOn="abc")
All classes listed will be compiled before this class. The class names provided must indicate classes in the same (or a previous) package. Multiple dependency classes can be identified using a single DependsOn line delimited by commas, or can be specified using a separate DependsOn line for each class. This is important when a class uses a struct or enum declared in another class, as the compiler only knows what is in the classes it has already compiled.
Within
Position:
Main
Type:
string
UCLASS(Within="abc")
This is handy for making it clear that a class is designed to be owned by another. Maybe it uses GetOuter
so it won't work when created within another class. Commonly used with APlayerController
.
Objects of this class cannot exist outside of an instance of an OuterClassName Object. This means that creating an Object of this class requires that an instance of OuterClassName is provided as its Outer Object.
UCLASS(Within=PlayerController)
class ENGINE_API UPlayerInput : public UObject
UI
Disable Native Tick
Position:
Meta
Type:
flag
UCLASS(meta=(DisableNativeTick))
Only used in one place in the engine, on UUserWidget
.
UCLASS(Abstract, editinlinenew, BlueprintType, Blueprintable, meta=( DontUseGenericSpawnObject="True", DisableNativeTick) )
class UMG_API UUserWidget : public UWidget, public INamedSlotInterface
Entry Interface
Position:
Meta
Type:
string (Interface name without leading `I`)
UCLASS(meta=(EntryInterface="abc"))
Used to specify the interface that must be implemented by entries to be usable by this list. Only used on UListViewBase
and UListView
.
/**
* A virtualized list that allows up to thousands of items to be displayed.
*
* An important distinction to keep in mind here is "Item" vs. "Entry"
* The list itself is based on a list of n items, but only creates as many entry widgets as can fit on screen.
* For example, a scrolling ListView of 200 items with 5 currently visible will only have created 5 entry widgets.
*
* To make a widget usable as an entry in a ListView, it must inherit from the IUserObjectListEntry interface.
*/
UCLASS(meta = (EntryInterface = UserObjectListEntry))
class UMG_API UListView : public UListViewBase, public ITypedUMGListView<UObject*>
Todo
Display Thumbnail
Position:
Meta
Type:
bool
Related:
UCLASS(meta=(DisplayThumbnail=true))
UCLASS(BlueprintType, meta = (DisplayThumbnail = "true"))
class PAPER2D_API UPaperFlipbook : public UObject
Experimental
Position:
Main
Type:
flag
UCLASS(Experimental)
Ignore Class Thumbnail
Position:
Meta
Type:
flag
UCLASS(meta=(IgnoreClassThumbnail))
Script Name
Position:
Main
Type:
string
UCLASS(ScriptName="abc")
UCLASS(MinimalAPI, meta=(ScriptName="ComposureLibrary"))
class UComposureBlueprintLibrary : public UBlueprintFunctionLibrary
Command Line I D
Position:
Meta
Type:
string
UCLASS(meta=(CommandLineID="abc"))
Only used in the UMovieSceneCapture
class as far as I can tell. For specifying image and movie file formats.
Optional
Position:
Main
Type:
flag
UCLASS(Optional)
Seems to be used on editor-only data like metadata and comment nodes.
This object type may not be available in certain context. (i.e. game runtime or in certain configuration). Optional class data is saved separately to other object types. (i.e. might use sidecar files)
Internal and Deprecated
Intrinsic
Position:
Main
Type:
flag
UCLASS(Intrinsic)
This indicates that the class was declared directly in C++, and has no boilerplate generated by Unreal Header Tool. Do not use this Specifier on new classes.
No Export
Position:
Main
Type:
flag
UCLASS(NoExport)
Indicates that this class's declaration should not be included in the automatically-generated C++ header file by the header generator. The C++ class declaration must be defined manually in a separate header file. Only valid for native classes. Do not use this for new classes.
Matched Serializers
Position:
Main
Type:
flag
UCLASS(MatchedSerializers)
Seems to be used for very low-level internal classes.
Uses Hierarchy
Position:
Meta
Type:
flag
UCLASS(meta=(UsesHierarchy))
The official documentation lists this for both UCLASS
and USTRUCT
but there are no instances of it being used in the codebase and no code that seems to recognise it. So I think it's maybe legacy or something someone forgot.
Indicates the class uses hierarchical data. Used to instantiate hierarchical editing features in Details panels.
Custom Constructor
Position:
Main
Type:
flag
UCLASS(CustomConstructor)
As of 5.3 has the comment "No longer used in the engine"
Prevents automatic generation of the constructor declaration.