UE4 宏

UPROPERTY

Specifiers Descriptions
Category 指定属性在蓝图编辑器中显示的类别,用 | 隔开可以设置子类别.
EditAnywhere 此属性可在原型和实例的属性窗口中编辑.
EditInstanceOnly 此属性只可在实例的属性窗口中编辑,不可在原型的属性窗口中编辑.
EditDefaultsOnly 此属性只可在原型的属性窗口中编辑,不可在实例的属性窗口中编辑.与Visible*说明符不兼容.
VisibleAnywhere 此属性可在属性窗口中可见,但是不能编辑.
VisibleInstanceOnly 此属性可在实例的属性窗口中可见,不可在原型的属性窗口中可见,也不可以编辑.
VisibleDefaultsOnly 此属性可在原型的属性窗口中可见,不可在实例的属性窗口中可见,也不可以编辑.
BlueprintReadOnly 此属性可被蓝图读取,但不可被蓝图更改.
BlueprintReadWrite 此属性可被蓝图读取,也可被蓝图写入.
Const 常量.
BlueprintCallable 仅用于多播委托.可从蓝图中调用.
Transient 临时属性,不应被保存,加载时初始化为0.与SaveGame说明符相反.
SaveGame 属性应该被SaveGame序列化到硬盘.与Transient说明符相反.

Template:Warning

Config
Property should be loaded/saved to ini file as permanent profile.

GlobalConfig
Same as above but load config from base class, not subclass.

Localized
Property should be loaded as localizable text. Implies ReadOnly.

DuplicateTransient
Property should always be reset to the default value during any type of duplication (copy/paste, binary duplication, etc.)

NonPIETransient
Property should always be reset to the default value during any type of duplication (copy/paste, binary duplication, etc.)

Ref
Value is copied out after function call. Only valid on function param declaration.

Template:Warning

Export
Object property can be exported with it's owner.

EditInline
Edit this object reference inline in the editor.

NoClear
Hide clear (and browse) button in the editor.

EditFixedSize
Indicates that elements of an array can be modified in Editor, but its size cannot be changed.

Template:Note

Template:Note

Replicated
Property is relevant to network replication.

ReplicatedUsing
Property will be configured for replication. The provided function is called only when the replicated property is received via replication.

Template:Example

Template:Note

RepRetry
Retry replication of this property if it fails to be fully sent (e.g. object references not yet available to serialize over the network)

NotReplicated
Skip replication (only for struct members and parameters in service request functions).

Interp
Interpolatable property for use with matinee. Always user-settable in the editor.

NonTransactional
Changes to this variable value will not be included in the editor's undo/redo history.

Instanced
Property is a component reference. Implies EditInline and Export.

BlueprintAssignable
MC Delegates only. Property should be exposed for assigning in blueprints.

Template:Example

SimpleDisplay
Properties appear visible by default in a details panel

AdvancedDisplay
Moves the property into the Advanced dropdown in the Details panel within the Editor.

Template:Note

AssetRegistrySearchable
The AssetRegistrySearchable keyword indicates that this property and it's value will be automatically added to the asset registry for any asset class instances containing this as a member variable. It is not legal to use on struct properties or parameters.

BlueprintAuthorityOnly
MC Delegates only. This delegate accepts (only in blueprint) only events with BlueprintAuthorityOnly.

TextExportTransient
Property shouldn't be exported to text format (e.g. copy/paste)

UFUNCTION

Specifiers Descriptions
Category 指定其在蓝图编辑工具中显示时所处的类别位置.
BlueprintImplementableEvent 本函数需要在蓝图中进行覆盖重写,不要在C++中实现它.自动生成的代码中将包含一个替换程序(thunk),它会调用PocessEvent以执行蓝图中的重写主体.
BlueprintNativeEvent 本函数需要在蓝图中进行覆盖重写,但是在C+ +中也需要提供一个本地实现.在C+ +中要提供一个[FunctionName]_Implementation形式的本地实现.自动生成的代码中将包含一个替换程序(thunk),必要时它会调用[FunctionName]_Implementation形式的本地实现.
BlueprintPure(纯蓝图) 本函数要满足不产生副作用(只读)的约定,并且暗含BlueprintCallable说明符.实现Get功能的有用且简洁的方式.
BlueprintCallable 可从蓝图与C+ +中调用此函数,并会将向蓝图编辑器工具用户公开.

SealedEvent
This function is sealed and cannot be overridden in subclasses. It is only a valid keyword for events; declare other methods as static or FINAL to indicate that they are sealed.

Exec
This function is executable from the Console CLI.

Server
This function is replicated, and executed on servers. Provide a body named [FunctionName]_Implementation instead of [FunctionName]. The auto-generated code will include a thunk that calls the implementation method when necessary.

Client
This function is replicated, and executed on clients. Provide a body named [FunctionName]_Implementation instead of [FunctionName]. The auto-generated code will include a thunk that calls the implementation method when necessary.

NetMulticast
This function is both executed locally on the server and replicated to all clients, regardless of the Actor's NetOwner

Reliable
Replication of calls to this function should be done on a reliable channel. Only valid when used in conjunction with Client or Server

Unreliable
Replication of calls to this function can be done on an unreliable channel. Only valid when used in conjunction with Client or Server

BlueprintAuthorityOnly
This function will not execute from Blueprint code if running on something without network authority.

BlueprintCosmetic
This function is cosmetic-only and will not run on dedicated servers.

CustomThunk
The UnrealHeaderTool code generator will not produce a execFoo thunk for this function. It is up to the user to provide one.

Template:Example

WithValidation
This function must supply a _Validate implementation

ServiceRequest
This function is RPC service request

ServiceResponse
This function is RPC service response

你可能感兴趣的:(UE4 宏)