The application and meaning of UE4 metadata keywords (2)

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

  • UFUNCTION: Indicates that the function can be called by the blueprint. Often used to define Blueprint functions.
  • UCLASS: Indicates that this class can be used by blueprints. Often used to define blueprint classes.
  • UPROPERTY: Indicates that the variable can be edited by the blueprint editor. Commonly used to define Blueprint variables.
  • const: Indicates that the variable is a constant and cannot be modified. Often used to define constants.
  • static: Indicates that the variable or function is a static member and belongs to the class rather than an instance. Often used to define static members.
  • virtual: Indicates that the function is a virtual function that can be overridden by subclasses. Often used to define virtual functions.
  • override: Indicates that the function is an overloaded function that overloads the virtual function of the parent class. Often used to overload virtual functions.
  • final: Indicates that the function is a final function and cannot be overridden by subclasses. Often used to define final functions.
  • inline: Indicates that the function is an inline function that can be expanded directly at compile time. Often used to define inline functions.
  • friend: Indicates that the function or class is a friend function or class that can access private members of the class. Often used to define friend functions or friend classes.
  • These keywords and modifiers can be used to define the attributes and behaviors of functions, classes, and variables. 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:

  • TSubclassOf: Indicates that the variable is a class reference, which can be used to limit the variable to only refer to a specific class or its subclasses. Often used to define reference variables for classes.
  • TArray: Indicates that the variable is an array that can store multiple elements of the same type. Often used to define array variables.
  • TMap: Indicates that the variable is a mapping table that can store multiple key-value pairs. Often used to define mapping table variables.
  • TSet: Indicates that the variable is a collection that can store multiple unique elements. Often used to define collection variables.
  • FStruct: Indicates that the variable is a structure that can store multiple member variables of different types. Often used to define structure variables.
  • Enum: Indicates that the variable is an enumeration type, which can restrict the variable to only take a certain value in the enumeration type. Often used to define enumeration type variables.

These keywords and modifiers can be used to define complex data types and data structures, and limit the value range and type of variables. Which keywords and modifiers to use depends on the specific needs.

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

  • UENUM: Indicates that the enumeration type can be used by blueprints. Commonly used to define Blueprint enum types.
  • USTRUCT: Indicates that the structure can be used by blueprints. Often used to define blueprint structures.
  • UINTERFACE: Indicates that the interface can be used by blueprints. Often used to define blueprint interfaces.
  • BlueprintImplementableEvent: Indicates that the function is a blueprint implementation event, and the function can be implemented in the blueprint. Commonly used to define blueprint implementation events.
  • BlueprintNativeEvent: Indicates that the function is a local blueprint event, which can be implemented in C++ code and overloaded in the blueprint. Commonly used to define local blueprint events.
  • BlueprintCallable: Indicates that the function can be called by the blueprint. Often used to define Blueprint functions.
  • BlueprintPure: Indicates that the function is a pure function, does not modify any state, and only returns the calculation result. Often used to define pure functions.
  • BlueprintAuthorityOnly: Indicates that the function can only be called on the server side. Often used to define functions that can only be called on the server side.
  • BlueprintCosmetic: Indicates that this function is only a visual effect and will not affect the game logic. Often used to define functions that are only visual effects.

These keywords and modifiers can be used to define the properties and behaviors of blueprint enumeration types, blueprint structures, blueprint interfaces, and blueprint functions. Which keywords and modifiers to use depends 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/130450382