UE4 宏

UPROPERTY

Specifiers Descriptions
Category 指定屬性在藍(lán)圖編輯器中顯示的類別,用 | 隔開可以設(shè)置子類別.
EditAnywhere 此屬性可在原型和實例的屬性窗口中編輯.
EditInstanceOnly 此屬性只可在實例的屬性窗口中編輯,不可在原型的屬性窗口中編輯.
EditDefaultsOnly 此屬性只可在原型的屬性窗口中編輯,不可在實例的屬性窗口中編輯.與Visible*說明符不兼容.
VisibleAnywhere 此屬性可在屬性窗口中可見,但是不能編輯.
VisibleInstanceOnly 此屬性可在實例的屬性窗口中可見,不可在原型的屬性窗口中可見,也不可以編輯.
VisibleDefaultsOnly 此屬性可在原型的屬性窗口中可見,不可在實例的屬性窗口中可見,也不可以編輯.
BlueprintReadOnly 此屬性可被藍(lán)圖讀取,但不可被藍(lán)圖更改.
BlueprintReadWrite 此屬性可被藍(lán)圖讀取,也可被藍(lán)圖寫入.
Const 常量.
BlueprintCallable 僅用于多播委托.可從藍(lán)圖中調(diào)用.
Transient 臨時屬性,不應(yīng)被保存,加載時初始化為0.與SaveGame說明符相反.
SaveGame 屬性應(yīng)該被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 指定其在藍(lán)圖編輯工具中顯示時所處的類別位置.
BlueprintImplementableEvent 本函數(shù)需要在藍(lán)圖中進(jìn)行覆蓋重寫,不要在C++中實現(xiàn)它.自動生成的代碼中將包含一個替換程序(thunk),它會調(diào)用PocessEvent以執(zhí)行藍(lán)圖中的重寫主體.
BlueprintNativeEvent 本函數(shù)需要在藍(lán)圖中進(jìn)行覆蓋重寫,但是在C+ +中也需要提供一個本地實現(xiàn).在C+ +中要提供一個[FunctionName]_Implementation形式的本地實現(xiàn).自動生成的代碼中將包含一個替換程序(thunk),必要時它會調(diào)用[FunctionName]_Implementation形式的本地實現(xiàn).
BlueprintPure(純藍(lán)圖) 本函數(shù)要滿足不產(chǎn)生副作用(只讀)的約定,并且暗含BlueprintCallable說明符.實現(xiàn)Get功能的有用且簡潔的方式.
BlueprintCallable 可從藍(lán)圖與C+ +中調(diào)用此函數(shù),并會將向藍(lán)圖編輯器工具用戶公開.

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末狮鸭,一起剝皮案震驚了整個濱河市蔫仙,隨后出現(xiàn)的幾起案子掸犬,更是在濱河造成了極大的恐慌,老刑警劉巖虑灰,帶你破解...
    沈念sama閱讀 221,635評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機据块,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,543評論 3 399
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來折剃,“玉大人另假,你說我怎么就攤上這事∨吕纾” “怎么了边篮?”我有些...
    開封第一講書人閱讀 168,083評論 0 360
  • 文/不壞的土叔 我叫張陵,是天一觀的道長奏甫。 經(jīng)常有香客問我戈轿,道長,這世上最難降的妖魔是什么阵子? 我笑而不...
    開封第一講書人閱讀 59,640評論 1 296
  • 正文 為了忘掉前任思杯,我火速辦了婚禮,結(jié)果婚禮上挠进,老公的妹妹穿的比我還像新娘色乾。我一直安慰自己,他們只是感情好奈梳,可當(dāng)我...
    茶點故事閱讀 68,640評論 6 397
  • 文/花漫 我一把揭開白布杈湾。 她就那樣靜靜地躺著,像睡著了一般攘须。 火紅的嫁衣襯著肌膚如雪漆撞。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,262評論 1 308
  • 那天于宙,我揣著相機與錄音浮驳,去河邊找鬼。 笑死捞魁,一個胖子當(dāng)著我的面吹牛至会,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播谱俭,決...
    沈念sama閱讀 40,833評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼奉件,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了昆著?” 一聲冷哼從身側(cè)響起县貌,我...
    開封第一講書人閱讀 39,736評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎凑懂,沒想到半個月后煤痕,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,280評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,369評論 3 340
  • 正文 我和宋清朗相戀三年摆碉,在試婚紗的時候發(fā)現(xiàn)自己被綠了塘匣。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,503評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡巷帝,死狀恐怖忌卤,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情锅睛,我是刑警寧澤埠巨,帶...
    沈念sama閱讀 36,185評論 5 350
  • 正文 年R本政府宣布,位于F島的核電站现拒,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏望侈。R本人自食惡果不足惜印蔬,卻給世界環(huán)境...
    茶點故事閱讀 41,870評論 3 333
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望脱衙。 院中可真熱鬧侥猬,春花似錦、人聲如沸捐韩。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,340評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽荤胁。三九已至瞧预,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間仅政,已是汗流浹背垢油。 一陣腳步聲響...
    開封第一講書人閱讀 33,460評論 1 272
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留圆丹,地道東北人滩愁。 一個月前我還...
    沈念sama閱讀 48,909評論 3 376
  • 正文 我出身青樓,卻偏偏與公主長得像辫封,于是被迫代替她去往敵國和親硝枉。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,512評論 2 359

推薦閱讀更多精彩內(nèi)容