The application and meaning of UE4 metadata keywords, function marking and special use (3)

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UPROPERTY(EditAnywhere, BlueprintReadWrite): Indicates that the variable can be edited in the blueprint editor, and can be read and written in the blueprint. Commonly used to define editable Blueprint variables.
  • UPROPERTY(EditDefaultsOnly, BlueprintReadOnly): Indicates that the variable can only be edited in the default value of the blueprint class, and can be read in the blueprint, but cannot be written in the blueprint. Often used to define read-only default value variables.
  • UPROPERTY(VisibleAnywhere, BlueprintReadOnly): Indicates that the variable is displayed in the variable list in the blueprint editor, and can be read in the blueprint, but cannot be written in the blueprint. Commonly used to define read-only Blueprint variables.
  • UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly): Indicates that the variable is only displayed in the variable list in the default value of the blueprint class, and can be read in the blueprint, but cannot be written in the blueprint. Often used to define read-only default value variables.
  • UPROPERTY(Category = "MyCategory"): Indicates that the variable is displayed in the specified category in the blueprint editor. Commonly used to group variables for display in the blueprint editor.
  • UFUNCTION(BlueprintImplementableEvent, Category = "MyCategory"): Indicates that the function is a blueprint implementation event and is displayed in the specified category in the blueprint editor. Commonly used to group blueprint implementation events for display in the blueprint editor.
  • UFUNCTION(BlueprintNativeEvent, Category = "MyCategory"): Indicates that the function is a local blueprint event and is displayed in the specified category in the blueprint editor. Commonly used to group local blueprint events for display in the blueprint editor.

These keywords and modifiers can be used to define the visibility, editability, classification, and behavior of blueprint variables and functions. Which keywords and modifiers to use depends on specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (DisplayName = "MyFunction")): Indicates that the function can be called by the blueprint, and the name displayed in the blueprint editor is "MyFunction". Commonly used to customize the display name of blueprint functions in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (Keywords = "MyKeyword1, MyKeyword2")): Indicates that the function can be called by the blueprint, and can be searched by the keywords "MyKeyword1" and "MyKeyword2" in the blueprint editor. Commonly used search keywords for custom blueprint functions in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (ToolTip = "MyToolTip")): Indicates that the function can be called by the blueprint, and the tooltip displayed in the blueprint editor is "MyToolTip". Commonly used for custom blueprint function tooltips in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (Keywords = "MyKeyword1, MyKeyword2", ToolTip = "MyToolTip")): Indicates that the function can be called by the blueprint, and can be searched by the keywords "MyKeyword1" and "MyKeyword2" in the blueprint editor , and the tooltip displayed in the blueprint editor is "MyToolTip". Commonly used for custom blueprint function search keywords and tooltips in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "MyOutputType")): Indicates that the function can be called by the blueprint, and the type of the output parameter can be automatically inferred as "MyOutputType" in the blueprint editor according to the type of the input parameter. Commonly used to automatically infer the output type of Blueprint functions.
  • UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "MyEnum")): Indicates that the function can be called by the blueprint, and the enumeration type "MyEnum" can be expanded into an execution pin in the blueprint editor. Commonly used to expand enum types into execution pins.
  • UFUNCTION(BlueprintCallable, meta = (ExpandBoolAsExecs)): Indicates that the function can be called by the blueprint, and the Boolean type can be expanded into an execution pin in the blueprint editor. Commonly used to expand boolean types into execution pins.

These keywords and modifiers can be used to customize the blueprint function's display name in the blueprint editor, search keywords, tooltips, output types, and execution pin expansion methods. Which keywords and modifiers to use depends on the specific need.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, CustomThunk, meta = (CustomStructureParam = "MyStruct")): Indicates that the function can be called by the blueprint, and is implemented using a custom thunk function, and uses the custom structure "MyStruct" as a parameter. Often used to customize the implementation and parameter types of blueprint functions.
  • UFUNCTION(BlueprintCallable, CustomThunk, meta = (CustomStructureParam = "MyStruct", CustomStructureParamMetaData = "MyMetaData")): Indicates that the function can be called by the blueprint and implemented using a custom thunk function, while using the custom structure "MyStruct "As a parameter, and use the custom metadata "MyMetaData" to describe the structure parameter. Often used to customize the implementation, parameter types, and metadata of blueprint functions.
  • UFUNCTION(BlueprintCallable, CustomThunk, meta = (CustomStructureParam = "MyStruct", CustomStructureParamMetaData = "MyMetaData", ExpandEnumAsExecs = "MyEnum")): Indicates that this function can be called by a blueprint and implemented using a custom thunk function, while using a custom The defined structure "MyStruct" is used as a parameter, and the custom metadata "MyMetaData" is used to describe the structure parameters, and the enumeration type "MyEnum" is expanded into an execution pin. Often used to customize the implementation, parameter types, metadata, and execution pin expansion of blueprint functions.

These keywords and modifiers can be used to customize the implementation, parameter types, metadata, and execution pin expansion of blueprint functions. Which keywords and modifiers to use depends on specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (AdvancedDisplay = "MyVariable")): Indicates that the function can be called by the blueprint, and the "Advanced Display" option is displayed in the blueprint editor, and more parameter settings can be expanded, where "MyVariable" is a An optional parameter name that specifies the expanded parameters. Often used to define Blueprint functions that require more parameter settings.
  • UFUNCTION(BlueprintCallable, meta = (WorldContext = "MyWorldContextObject")): Indicates that this function can be called by a blueprint and requires a world context object "MyWorldContextObject" as a parameter. Commonly used to define Blueprint functions that require access to the world context.
  • UFUNCTION(BlueprintCallable, meta = (UnsafeDuringActorConstruction = "true")): Indicates that the function can be called by the blueprint and can be called in the Actor constructor. Commonly used to define Blueprint functions that can be called in Actor constructors.
  • UFUNCTION(BlueprintCallable, meta = (ToolTipPriority = "1")): Indicates that the function can be called by the blueprint, and the priority of the tooltip displayed in the blueprint editor is "1". Commonly used to customize the tooltip priority of blueprint functions in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (Keywords = "MyKeyword1, MyKeyword2", ToolTipPriority = "1")): Indicates that the function can be called by the blueprint, and can be searched by the keywords "MyKeyword1" and "MyKeyword2" in the blueprint editor , and the tooltip priority displayed in the blueprint editor is "1". Commonly used to customize the search keywords and tooltip priorities of blueprint functions in the blueprint editor.

These keywords and modifiers can be used to customize the advanced display of blueprint functions in the blueprint editor, the world context, calls in Actor constructors, tooltip priority, and search keywords. Which keywords and modifiers are used depends on for specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (HidePin = "MyPin")): Indicates that the function can be called by the blueprint, and hides the input parameter pin named "MyPin" in the blueprint editor. Often used to hide parameter pins that don't need to be set in Blueprints.
  • UFUNCTION(BlueprintCallable, meta = (HidePin = "MyPin", DefaultToSelf = "MySelf")): Indicates that the function can be called by the blueprint, and the input parameter pin named "MyPin" is hidden in the blueprint editor, and the default The self object is set to "MySelf". It is often used to hide parameter pins that do not need to be set in the blueprint, and set the default self object.
  • UFUNCTION(BlueprintCallable, meta = (HidePin = "MyPin", DefaultToSelf = "MySelf", BlueprintInternalUseOnly = "true")): Indicates that the function can be called by the blueprint and hides the input parameter named "MyPin" in the blueprint editor Pin, and set the default self object to "MySelf", and this function can only be used inside the blueprint. It is often used to hide parameter pins that do not need to be set in the blueprint, and set the default self object, and restrict the function to be used only inside the blueprint.
  • UFUNCTION(BlueprintCallable, meta = (AdvancedDisplay = "MyVariable", ExpandEnumAsExecs = "MyEnum")): Indicates that the function can be called by the blueprint, and the "Advanced Display" option is displayed in the blueprint editor, and more parameter settings can be expanded, Where "MyVariable" is an optional parameter name for specifying expanded parameters, and the enumeration type "MyEnum" is expanded as an execution pin. Commonly used to define Blueprint functions that require more parameter settings and unwind enum types as execution pins.

These keywords and modifiers can be used to customize the hiding, default value, internal use, and advanced display of the parameter pins of the blueprint function in the blueprint editor, as well as expand the enumeration type into an execution pin, which keywords are used specifically and modifiers depend on specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (CompactNodeTitle = "MyTitle")): Indicates that the function can be called by the blueprint, and the title of the compact node displayed in the blueprint editor is "MyTitle". Often used for compact node titles in the blueprint editor for custom blueprint functions.
  • UFUNCTION(BlueprintCallable, meta = (CompactNodeTitle = "MyTitle", Keywords = "MyKeyword1, MyKeyword2")): Indicates that the function can be called by the blueprint, and the title of the compact node displayed in the blueprint editor is "MyTitle", which can be passed " MyKeyword1" and "MyKeyword2" keywords. Compact node titles and search keywords commonly used for custom blueprint functions in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (CompactNodeTitle = "MyTitle", Keywords = "MyKeyword1, MyKeyword2", ToolTip = "MyToolTip")): Indicates that the function can be called by the blueprint, and the title of the compact node displayed in the blueprint editor is " MyTitle", you can search through the keywords "MyKeyword1" and "MyKeyword2", and the tooltip displayed at the same time is "MyToolTip". Compact node titles, search keywords, and tooltips commonly used in the blueprint editor for custom blueprint functions.
  • UFUNCTION(BlueprintCallable, meta = (CompactNodeTitle = "MyTitle", Keywords = "MyKeyword1, MyKeyword2", ToolTip = "MyToolTip", AutoCreateRefTerm = "MyTerm")): Indicates that the function can be called by the blueprint and displayed in the blueprint editor The compact node title of "MyTitle" can be searched by "MyKeyword1" and "MyKeyword2" keywords, and the tooltip displayed at the same time is "MyToolTip", and the parameter named "MyTerm" is automatically converted to a reference type. Commonly used for custom blueprint functions in the blueprint editor are compact node titles, search keywords, tooltips, and automatic conversion of parameters to reference types.

These keywords and modifiers can be used to customize the compact node title of the blueprint function in the blueprint editor, search keywords, tooltips, and automatically convert parameters to reference types. Which keywords and modifiers to use depends on specific needs .

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (DisplayName = "MyFunction", ScriptName = "MyScriptFunction")): Indicates that the function can be called by the blueprint, and the name displayed in the blueprint editor is "MyFunction", and the name in the blueprint script is "MyScriptFunction". Commonly used to customize the display name of blueprint functions in the blueprint editor and the name in blueprint scripts.
  • UFUNCTION(BlueprintCallable, meta = (DisplayName = "MyFunction", ScriptName = "MyScriptFunction", DeprecatedFunction = "OldFunction")): Indicates that the function can be called by the blueprint, and the name displayed in the blueprint editor is "MyFunction", in The name in the blueprint script is "MyScriptFunction", and this function has been deprecated, it is recommended to use "OldFunction" instead. Commonly used to customize the display name of a blueprint function in the blueprint editor and the name in the blueprint script, and to mark the function as deprecated.
  • UFUNCTION(BlueprintCallable, meta = (DisplayName = "MyFunction", ScriptName = "MyScriptFunction", DeprecatedFunction = "OldFunction", DeprecationMessage = "Use OldFunction instead.")): Indicates that the function can be called by the blueprint, and in the blueprint editor The displayed name is "MyFunction", and the name in the blueprint script is "MyScriptFunction". At the same time, this function has been deprecated. It is recommended to use "OldFunction" instead, and a deprecation message of "Use OldFunction instead." will be displayed. Commonly used to customize the display name of a blueprint function in the blueprint editor and the name in the blueprint script, and mark the function as deprecated, and display a deprecation message.

These keywords and modifiers can be used to customize the display name of the blueprint function in the blueprint editor, the name in the blueprint script, the deprecation flag, and the deprecation message. Which keywords and modifiers to use depends on specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "MyInput")): Indicates that the function can be called by the blueprint, and the output type can be determined according to the input parameter "MyInput". Commonly used to define Blueprint functions that determine the output type based on input parameters.
  • UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "MyInput", DynamicOutputParam = "MyOutput")): Indicates that the function can be called by the blueprint, and the output type can be determined according to the input parameter "MyInput", and the output parameter "MyOutput" is set is a dynamic type. It is often used to define blueprint functions that determine the output type according to the input parameters and set the output parameters to dynamic types.
  • UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "MyInput", DynamicOutputParam = "MyOutput", BlueprintThreadSafe = "true")): Indicates that the function can be called by the blueprint, and the output type can be determined according to the input parameter "MyInput", and will The output parameter "MyOutput" is set to a dynamic type, and the function can be used in a multi-threaded environment. It is often used to define blueprint functions that determine the output type according to the input parameters, set the output parameters to dynamic types, and support multi-threading.

These keywords and modifiers can be used to customize the blueprint function to determine the output type according to the input parameters, and set the output parameters to be dynamic types, and support multi-threading. Which keywords and modifiers to use depends on specific needs.

In addition to the above keywords and modifiers, UE4 has some other keywords and modifiers, as follows:

  • UFUNCTION(BlueprintCallable, meta = (CustomThunk, DisplayName = "MyFunction")): Indicates that the function can be called by the blueprint, and is implemented using a custom thunk function, and the name displayed in the blueprint editor is "MyFunction". Often used to customize the implementation of blueprint functions, and display the customized name in the blueprint editor.
  • UFUNCTION(BlueprintCallable, meta = (CustomThunk, DisplayName = "MyFunction", BlueprintInternalUseOnly = "true")): Indicates that the function can be called by the blueprint, and is implemented using a custom thunk function, and the name displayed in the blueprint editor is "MyFunction", and the function can only be used inside the blueprint. It is often used to customize the implementation of blueprint functions, and display the custom name in the blueprint editor, and restrict the function to be used only inside the blueprint.
  • UFUNCTION(BlueprintCallable, meta = (CustomThunk, DisplayName = "MyFunction", BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "MyTerm")): Indicates that the function can be called by the blueprint and implemented using a custom thunk function, while in the blueprint The name displayed in the editor is "MyFunction", and the function can only be used inside the blueprint, and the parameter named "MyTerm" is automatically converted to a reference type. It is often used to customize the implementation of blueprint functions, and display the custom name in the blueprint editor, and restrict the function to be used only inside the blueprint, and automatically convert parameters to reference types.

These keywords and modifiers can be used to customize the implementation of blueprint functions, and display custom names in the blueprint editor, as well as restrict the function to be used only inside the blueprint, and automatically convert parameters to reference types. Specifically use Which keywords and modifiers depend on specific needs.

Unreal Engine (UE) advanced technical exchange group: 769397359

 Click here for the tutorial link: Master AI-Control the Future-Learn Video Tutorials-Tencent Classroom

Guess you like

Origin blog.csdn.net/u013007305/article/details/130450394