UE4函数和属性说明符
When declaring properties, specifiers can be added to the declaration to control how the property behaves with various aspects of the engine and editor.
当声明属性时,说明符可以被添加到该声明中以控制属性的作用与引擎和编辑器的各个方面。
AdvancedDisplay | Properties are in the advanced dropdown in a Details panel. 属性显示在详细信息窗格的高级下拉菜单中。 |
AssetRegistrySearchable | The AssetRegistrySearchable keyword indicates that this property and its 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. 在结构体中的属性或参数上使用此关键字是非法的。 |
BlueprintAssignabl | Multicast Delegates only. Property should be exposed for assigning in Blueprints. |
BlueprintCallable | Multicast Delegates only. Property should be exposed for calling in Blueprint code. |
BlueprintReadOnly | This property can be read by Blueprints, but not modified. |
BlueprintReadWrite | This property can be read or written from a Blueprint. |
Category | Specifies the category of the property. 指定该属性类别。用法:Category=类别名 |
Config | This variable will be made configurable. The current value can be saved to the ini file and will be loaded when created. Cannot be given a value in default properties. Implies ReadOnly. 在默认属性中不能赋值意味着它是只读的。 |
Const | This variable is const and should be exported as const. |
DuplicateTransient | Indicates that the variable's value should be reset to the class default value during any type of duplication (copy/paste, binary duplication, etc.). |
EditAnywhere | Indicates that this property can be edited by property windows in the editor. 表明这个属性可以通过编辑器中的属性窗口进行编辑。 |
EditDefaultsOnly | Indicates that this property can be edited by property windows, but only on archetypes. 表明这个属性可以通过编辑器中的属性窗口进行编辑,但仅限于原型。 |
EditFixedSize | Only useful for dynamic arrays. This will prevent the user from changing the length of an array via the Unreal Editor property window. 唯一有用的动态数组。这将防止用户从经由虚幻编辑属性窗口改变的阵列的长度。 |
EditInline | Allows the user to edit the properties of the object referenced by this variable within Unreal Editor's property inspector (only useful for object references, including arrays of object reference). 允许用户编辑由虚幻编辑器的属性检查器中的这个变量所引用的对象的属性 (仅适用于对象引用,包括数组对象引用)。 |
EditInstanceOnly | Indicates that this property can be edited by property windows, but only on instances, not on archetypes. 表明这个属性可以通过属性窗口进行编辑,但仅限于实例,而不是原型。 |
Export | Only useful for object properties (or arrays of objects). Indicates that the object assigned to this property should be exported in its entirety as a subobject block when the object is copied (for copy/paste) or exported to T3D, as opposed to just outputting the object reference itself. 仅适用于对象属性(或对象数组)。表明分配给此属性的对象应被全部导出为一个子对象块当对象被复制(复制/粘贴) 或导出到T3D,而不是仅仅输出对象引用本身。 |
GlobalConfig | Works just like config except that you cannot override it in a subclass. Cannot be given a value in default properties. Implies ReadOnly. 类似于Config除了你不能覆盖他的子类。不能给默认属性赋值。意味着它是只读的。 |
Instanced | Object properties only. When an instance of this class is created, it will be given a unique copy of the object assigned to this variable in defaults. Used for instancing subobjects defined in class default properties. Implies EditInline and Export. 仅限于对象属性。当创建该类的一个实例时,它将被给予对象的唯一拷贝到默认变量中。 用于实例化用于实例化类的默认属性定义的子对象。意味着EditInline 和Export。 |
Interp | Indicates that the value can be driven over time by a track in Matinee. 表示该值可以通过Matinee中的轨道被驱动一段时间。 |
Localized | The value of this variable will have a localized value defined. Mostly used for strings. Implies ReadOnly. 这个变量的值将定义一个本地化值。主要用于字符串。意味着它是只读的。 |
Native | Property is native: C++ code is responsible for serializing it and exposing to GC. 本地属性:C++代码负责序列化并暴露给GC。 |
NoClear | Prevents this object reference from being set to None from the editor. Hides clear (and browse) button in the editor. 防止被编辑器设置为无的对象引用。在编辑器中隐藏清除(和浏览)按钮。 |
NoExport | Only useful for native classes. This variable should not be included in the auto-generated class declaration. 仅用于本地类。这个变量不应该包括在自动生成的类声明中。 |
NonTransactional | Indicates that changes to this variable value will not be included in the editor's undo/redo history. 表明更改此变量值将不会列入编辑器的撤销/重做的历史。 |
Ref | Value is copied out after function call. Only valid on function param declaration. 在函数调用以后被复制出来。仅适用于功能参数的声明上。 |
Replicated | The variable should be replicated over the network. 该变量应该被复制在网络上。 |
ReplicatedUsing | The variable should be replicated over the network, executing the Callback function when it is received. 该变量应该被复制在网络上。当被接收时执行Callback函数。用法:ReplkicatedUsing=函数名。 |
RepRetry | Only useful for struct properties. Retry replication of this property if it fails to be fully sent (e.g. object references not yet available to serialize over the network). For simple references, this is the default, but for structs, this is often undesirable due to the bandwidth cost, so it is disabled unless this flag is specified. 仅用于结构属性。如果无法完全发送(比如对象引用序列化在网络上尚不可用) 则重试此属性的复制。对于简单的引用,这是默认的,但是对于结构,这往往是不可取的,由于带宽成本, 所以它被禁用,除非指定这个标志。 |
SaveGame | The SaveGame specifier is a simple way to include fields explicitly for a checkpoint/save system at the property level. You set the flag on all fields you want to save and then use a proxy archiver to read/write it. SaveGame说明符是一种简单的方式显式地包含字段属性级别的检查点/保存系统。 在你想保存的领域设置这个标志,然后使用代理模式来读取或写入。 |
SerializeText | Native property should be serialized as text (ImportText, ExportText). 本地属性应该被序列化为文本(ImportText,ExportText)。 |
SimpleDisplay | Properties appear visible by default in a Details panel. 属性默认显示在详细信息面板中。 |
Transient | Property is transient: should not be saved, zero-filled at load time. 瞬时属性:不会被保存,加载时零填充。 |
VisibleAnywhere | Indicates that this property is visible in property windows, but cannot be edited at all. 表明这个属性在属性窗口可见,但不能被编辑。 |
VisibleDefaultsOnly | Indicates that this property is only visible in property windows for archetypes, and cannot be edited. 表明这个属性只能在原型的属性窗口可见,且不能进行编辑。 |
VisibleInstanceOnly | Indicates that this property is only visible in property windows for instances, not for archetypes, and cannot be edited. 表明这个属性只能在实例的属性窗口可见,不被原型可见,且不能进行编辑。 |
Function Specifiers函数说明符
When declaringfunctions, specifiers can be added to the declaration to control how thefunction behaves with various aspects of the engine and editor.
当声明函数时,说明符可被添加到声明,以控制函数的行为与引擎和编辑器的各个方面。
BlueprintAuthorityOnly | This function will not execute from blueprint code if running on something without network authority. |
BlueprintCallable | The function can be executed in a Blueprint or Level Blueprint graph. |
BlueprintCosmetic | This function is cosmetic and will not run on dedicated servers. |
BlueprintImplementableEvent | The function can be overridden in a Blueprint or Level Blueprint graph. |
BlueprintNativeEvent | This function is designed to be overridden by a Blueprint, but also has a native implementation. Provide a body named [FunctionName]_Implementation instead of [FunctionName]; the autogenerated code will include a thunk that calls the implementation method when necessary. |
BlueprintPure | The function does not affect the owning object in any way and can be executed in a Blueprint or Level Blueprint graph. |
Category | Specifies the category of the function when displayed in Blueprint editing tools. |
Client | The function is only executed on the client that owns the Object the function belongs to. Provide a body named [FunctionName]_Implementation instead of [FunctionName]; the autogenerated code will include a thunk that calls the implementation method when necessary. |
CustomThunk | The UnrealHeaderTool code generator will not produce a execFoo thunk for this function; it is up to the user to provide one. |
Exec | The function can be executed from the in-game console. Exec commands only function when declared within certain class. |
NetMulticast | This function is both executed locally on the server and replicated to all clients, regardless of the Actor's NetOwner. |
Reliable | The function is replicated over the network, and is guaranteed to arrive regardless of bandwidth or network errors. Only valid when used in conjunction with Client or Server. |
Server | The function is only executed on the server. Provide a body named [FunctionName]_Implementation instead of [FunctionName]; the autogenerated code will include a thunk that calls the implementation method when necessary. |
Unreliable | The function is replicated over the network but can fail due to bandwidth limitations or network errors. Only valid when used in conjunction with Client or Server. |