Defining EventTag in C++

这里的声明类似于GameplayTag的声明。

1. Declaration of custom EventTag in C++ .h file

The declaration here is similar to the declaration of GameplayTag.
The main macros used are: UE_DECLARE_EVENT_TAG_EXTERN()
Parameter TagName, the name of EventTag Example definition:

2. Definition of declared EventTag in C++ .cpp file

Without parameters, without Tag description: UE_DEFINE_EVENT_TAG()
TagName: This is the name of the EventTag passed in as declared in the .h file.
Tag: This is the specific Tag name separated by ., which is used to display the name in the blueprint.
Without parameters, with Tag description: UE_DEFINE_EVENT_TAG_COMMENT()
TagName: This is the name of the EventTag passed in as declared in the .h file.
Tag:This is the specific tag name separated by ., which is used to display the name in the blueprint.
Comment:That is, the description information of this Tag, which is used to easily check what this EventTag does in the blueprint.
With parameters, without Tag description: UE_DEFINE_EVENT_TAG_HANDLE()
TagName: This is the name of the EventTag passed in as declared in the .h file.
Tag:This is the specific tag name separated by ., which is used to display the name in the blueprint.
Parameters:This is the parameter list of this event, mainly used for compatibility with blueprints. For specific parameter definitions, see
With parameters and tag description: UE_DEFINE_EVENT_TAG_HANDLE_COMMENT()
TagName: This is the name of the EventTag passed in as declared in the .h file.
Tag:This is the specific tag name separated by ., which is used to display the name in the blueprint.
Parameters:This is the parameter list of this event, mainly used for compatibility with blueprints. For specific parameter definitions, see
Comment:That is, the description information of this Tag, which is used to easily check what this EventTag does in the blueprint.
Example definition:

Comments

Table of Contents