Language:
Page Info
Engine Version:

Class Specifiers

Choose your OS:

When declaring classes, specifiers can be added to the declaration to control how the class behaves with various aspects of the engine and editor.

Class Specifier

Effect

Abstract

The Abstract class specifier declares the class as an "abstract base class", preventing the user from adding Actors of this class to the world in Unreal Editor or creating instances of this class during the game. 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 - you can place an instance of the ATriggerBox class in the world and have it be useful, while an instance of ATriggerBase by itself is not useful.

AdvancedClassDisplay

The AdvancedClassDisplay class specifier forces all the Properties of the class to only show in the advanced sections in the Details panel, and hidden from view by default. To override this on an individual Property, use the SimpleDisplay specifier on that Property.

AutoCollapseCategories=(Category1, Category2, ...)

The AutoCollapseCategories class specifier negates the effects, for the listed categories, of the AutoExpandCategories specifier on a parent class.

AutoExpandCategories=(Category1, Category2, ...)

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.

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.

BlueprintType

Exposes this class as a type that can be used for variables in Blueprints.

ClassGroup=GroupName

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.

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; however, child classes can override this using the DontCollapseCategories specifier.

Config=ConfigName

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".

Const

All Properties and functions in this class are const and are exported as const. This specifier is inherited by subclasses.

ConversionRoot

A root convert limits a sub-class to only be able to convert to child classes of the first root class going up the hierarchy.

CustomConstructor

Prevents automatic generation of the constructor declaration.

DefaultToInstanced

All instances of this class are considered "instanced". Instanced classes (components) are duplicated upon construction. This specifier is inherited by subclasses.

DependsOn=(ClassName1, ClassName2, ...)

All classes listed will be compiled before this class. ClassName must specify a class in the same (or a previous) package. Multiple dependency classes can be specified 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.

Deprecated

This class is deprecated and Objects of this class will not be saved when serializing. This specifier is inherited by subclasses.

DontAutoCollapseCategories=(Category, Category, ...)

Negates the AutoCollapseCategories specifier for the listed categories inherited from a parent class.

DontCollapseCategories

Negates a CollapseCatogories specifier inherited from a base class.

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 specifier using the NotEditInlineNew specifier.

HideCategories=(Category1, Category2, ...)

Lists one or more categories that should be hidden in the Unreal Editor Property window for Objects of this class. To hide Properties declared with no category, use the name of the class which declares the variable. This specifier is propagated to child classes.

HideDropdown

Prevents this class from showing up in Unreal Editor property window combo boxes.

HideFunctions=(Category1, Category2, ...)

Hides all functions in the the specified category from the property viewer.

HideFunctions=FunctionName

Hides the named functions from the property viewer.

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.

MinimalAPI

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.

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.

NonTransient

Negates a Transient specifier inherited from a base class.

NotBlueprintable

Specifies that this class is not an acceptable base class for creating blueprints. This is the default and is inherited by subclasses.

NotPlaceable

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.

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.

Placeable

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.

ShowCategories=(Category1, Category2, ...)

Negates a HideCategories specifier (inherited from a base class) for the listed categories.

ShowFunctions=(Category1, Category2, ...)

Shows all functions within the listed categories in a property viewer.

ShowFunctions=FunctionName

Shows the named function in a property viewer.

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.

Within=OuterClassName

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.

Metadata Specifiers

The usage of metadata specifiers differs between regular classes, functions, and interfaces.

Classes can use the following metatag specifier:

Class Meta Tag

Effect

BlueprintSpawnableComponent

If present, the component class can be spawned by a Blueprint.

BlueprintThreadSafe

Only valid on Blueprint Function Libraries. This specifier marks the functions in this class as callable on non-game threads in Animation Blueprints.

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.

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.

DeprecatedNode

For Behavior Tree nodes, indicates that the class is deprecated and will display a warning when compiled.

DeprecationMessage="Message Text"

If the class is deprecated, this message will be added to the standard deprecation warning when trying to compile a Blueprint that uses it.

DisplayName="Blueprint Node Name"

The name of this node in a Blueprint will be replaced with the value provided here, instead of the code-generated name.

DontUseGenericSpawnObject

Do not spawn an object of the class using Generic Create Object node in Blueprint. This specifier makes sense only for BluprintType classes that are neither Actors nor ActorComponents.

ExposedAsyncProxy

Expose a proxy object of this class in Async Task nodes.

IgnoreCategoryKeywordsInSubclasses

Used to make the first subclass of a class ignore all inherited ShowCategories and HideCategories specifiers.

IsBlueprintBase="true/false"

States that this class is (or is not) an acceptable base class for creating blueprints, similar to the UCLASS specifiers, Blueprintable or 'NotBlueprintable`.

KismetHideOverrides="Event1, Event2, .."

List of blueprint events that are not be allowed to be overridden.

ProhibitedInterfaces="Interface1, Interface2, .."

Lists Interfaces that are not compatible with the class.

RestrictedToClasses="Class1, Class2, .."

Used by Blueprint Function Library classes to restrict usage to the classes named in the list.

ShortToolTip

A short tooltip that is used in some contexts where the full tooltip might be overwhelming, such as the parent class picker dialog.

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.

UsesHierarchy

Indicates the class uses hierarchical data. Used to instantiate hierarchical editing features in Details panels.

ToolTip

Overrides the automatically generated tooltip from code comments.