UE4鎻掍欢
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了UE4鎻掍欢相关的知识,希望对你有一定的参考价值。
- 濡傛灉浣犵殑鎻掍欢鍖呭惈澶氫釜C++妯″潡锛屽苟涓斿湪Public鏂囦欢澶逛腑鐨勪唬鐮佽兘鍦ㄦ彃浠剁殑鍚勬ā鍧椾腑鍏变韩銆?/li>
- 濡傛灉浣犳鍦ㄥ垱寤轰竴涓父鎴忔彃浠讹紙涓嶆槸寮曟搸鎻掍欢锛夛紝骞朵笖浣犳兂璁╂父鎴忎笌浣犵殑涓€涓彃浠舵ā鍧楅潤鎬侀摼鎺ャ€傝繖鎵撶牬浜嗕竴涓彃浠剁偣鐨勬蹇碉紝浣嗘槸鐢虫槑涓€涓柊鐨勬父鎴忕被鍙互缁ф壙鎴栫洿鎺ヤ娇鐢ㄧ殑UObject绫诲瀷瀵逛簬鎻掍欢鏉ヨ閫氬父鏄緢鏈夌敤鐨勩€傚紩鎿庢湰韬笉渚濊禆浜庤繖涓彃浠讹紝浣嗘父鎴忛」鐩唬鐮佸拰鍐呭寰堟湁鍙兘鏈夌洿鎺ョ殑渚濊禆鍏崇郴銆?/li>
- 濡傛灉浣犳兂浣跨敤鎻掍欢鍙戝竷鍏叡鎺ュ彛澶达紙public interface headers锛夛紝浠ュ厑璁告父鎴忎唬鐮佹垨鍏朵粬鎻掍欢璁块棶鎻掍欢妯″潡涓疄鐜扮殑绫诲瀷銆傝繖鏄潪甯稿皯瑙佺殑锛屼竴鑸笉鎺ㄨ崘鍙敤杩欑鏂规硶锛屽洜涓烘垜浠洰鍓嶄笉鎵撶畻鏀寔涓€涓彃浠剁洿鎺ヤ緷璧栦簬鍙︿竴涓彃浠躲€?/li>
- 缂栬緫鎻掍欢鎻忚堪绗︼紙.uplugin鏂囦欢锛夊苟纭繚鎻掍欢鍚嶇О銆佹ā鍧椼€傜増鏈拰閰嶇疆鎵€闇€鐨勫叾浠栬缃€?/li>
- 鍒犻櫎鎻掍欢鐨勪簩杩涘埗鏂囦欢鍜屼腑闂存枃浠跺す銆傜‘淇濅粠涓€涓共鍑€鐨剆late寮€濮嬨€?/li>
- 濡傛灉鎻掍欢鍖呭惈Source鏂囦欢澶癸紝缂栬瘧Win64 Development閰嶇疆鐗堟湰鐨勬彃浠朵簩杩涘埗鏂囦欢銆傝繖涓厤缃槸PC骞冲彴鍔犺浇鎻掍欢鎬绘槸闇€瑕佺殑銆?/li>
- 瀵逛簬鎻掍欢鐨凷ource锛屽鏋滀綘甯屾湜鏀寔棰濆鐨勯厤缃紝渚嬪Mac绯荤粺锛屾墍浠ュ簲璇ュ缓绔嬭繖浜涖€?/li>
- 灏嗘彃浠跺鍒跺埌宸ョ▼鐩綍澶栫殑涓€涓柊鐨勪复鏃舵枃浠跺す涓€傝繖涓嶆槸蹇呴』鐨勶紝浣嗕細鍦ㄨ繖涓复鏃舵枃浠跺す涓鎻掍欢杩涜淇敼銆?/li>
- 鍦ㄦ彃浠剁殑涓存椂鐩綍涓紝鍒犻櫎涓棿鐩綍銆傝繖浜涢兘鏄复鏃舵€х殑鐩綍锛屼笉搴旇琚垎鍙戙€?/li>
- 濡傛灉鎻掍欢鍖呭惈婧愭枃浠朵唬鐮侊紝浣嗕笉鎯冲彂甯冨畠锛屽湪鎻掍欢鐨勪复鏃舵枃浠跺す涓垹闄ource鏂囦欢澶瑰嵆鍙€?/li>
- 鍦ㄦ彃浠剁殑涓存椂鐩綍涓紝鍙互鍒犻櫎鎵€浠ヤ笉鎯冲彂甯冪殑鏂囦欢銆?/li>
- 鏈€鍚庯紝鎻掍欢灏卞彲浠ュ噯澶囧彂甯冧簡锛?/li>
- 鏆備笉鏀寔鍙戝竷鐨勬彃浠朵腑浠呭寘鍚玃ublic澶存枃浠躲€傛墍浠ヤ綘蹇呴』鍖呭惈鏁翠釜Source鐩綍鎴栬€呮病鏈変换浣昐ource鐩綍銆傛垜浠墦绠楀湪浠婂悗娣诲姞鍙戝竷Public婧愭枃浠讹紙浠ュ強*.build.cs鏂囦欢锛夌殑鏀寔銆?/li>
- 鎴戜滑姝e湪璋冩煡杩欎釜杩囩▼鐨勮嚜鍔ㄥ寲宸ュ叿銆傛洿澶氱粏鑺傚皢鍦ㄧ◢鍚庡彂甯冦€?/li>
- 瀵逛簬鎻掍欢鐨凜ontent锛屼綘鍙兘甯屾湜鐢熸垚娲剧敓鏁版嵁鍖呭惈浜庢彃浠朵腑锛屼互閬垮厤缁堢鐢ㄦ埛闇€瑕佸畠鐢熶骇鏂扮殑闇€姹傘€備絾姝ゅ姛鑳藉皻鏈彁渚涳紝浣嗗皢鍦ㄧ◢鍚庢坊鍔犮€傛暚璇峰叧娉ㄣ€?/li>
澶嶅埗涓€涓疄渚嬫彃浠跺埌涓€涓柊鐨勬枃浠跺す涓紝閲嶅懡鍚嶇洰褰曘€佹枃浠跺拰浠g爜鍐呭浠ュ尮閰嶆柊鐨勬彃浠跺悕绉般€備笉鐒剁殑璇濅細涓庡唴缃殑鎻掍欢鍖呮嫭寮曟搸鍙戠敓鍐茬獊銆?/p>
鍦ㄦ父鎴忛」鐩洰褰曞垱寤轰竴涓€淧lugins鈥濇枃浠跺す锛岀劧鍚庡鍒舵彃浠剁殑鎵€鏈夊瓙鐩綍鍒扳€淧lugins鈥濈洰褰曚笅銆?
Rebuild浣犵殑C++椤圭洰鏂囦欢銆傛彃浠舵ā鍧楀拰婧愪唬鐮佸皢鍑虹幇鍦ㄥ伐绋嬬洰褰曚笅鐨勪竴涓洰褰曚腑銆?/p>
閫氬父缂栬瘧娓告垙椤圭洰锛孶BT灏嗘娴嬪埌鎻掍欢锛屽苟灏嗗畠浠紪璇戜负娓告垙椤圭洰鐨勪緷璧栧叧绯伙紒
鍚姩缂栬緫鍣紙鎴栨父鎴忥級锛屼綘鐨勬彃浠跺皢琚鐢紝浣嗕綘鍙互鍦ㄧ紪杈戠晫闈腑鎵撳紑瀹冦€?/p>
鎵撳紑鎻掍欢缂栬緫鍣紙Windows 鈥?gt; Plugins锛夛紝鎼滅储浣犵殑鎻掍欢锛孍nable瀹?/p>
閲嶆柊鍚姩缂栬緫鍣ㄣ€備綘鐨勬彃浠跺皢鍦ㄥ惎鍔ㄦ椂鑷姩鍔犺浇銆?/p>
鏍囩锛?/p>
缈昏瘧鐨勬湁鐐圭儌锛屾湁閿欒鐨勫湴鏂规杩庡ぇ瀹舵寚鍑猴紝鍘熸枃璇锋煡鐪婾E4瀹樻柟鎻掍欢鏂囨。
杩欑瘒鏂囩珷璁茶堪浜嗗浣曚娇鐢║E tools 鍜宺untime寮€鍙戣嚜宸辩殑鎻掍欢銆?/p>
璁稿UE瀛愮郴缁熼兘鏄彲鎵╁睍鐨勶紝鍏佽浣犳坊鍔犳柊鐨勫姛鑳斤紝淇敼鍐呯疆鐨勫姛鑳借€屼笉闇€瑕佷慨鏀瑰紩鎿庝唬鐮併€備綘鍙互娣诲姞鏂扮殑鏂囦欢绫诲瀷锛屾坊鍔犳柊鐨勮彍鍗曢」鍜屽伐鍏锋爮鍛戒护鍒扮紪杈戝櫒涓紝鐢氳嚦娣诲姞鏂板姛鑳藉拰缂栬緫鍣ㄥ瓙妯″紡銆?/p>
濡傛灉浣犵幇鍦ㄥ氨鎯宠瘯鐫€浣跨敤鎻掍欢锛屽彲浠ョ洿鎺ヨ鐪婸lugin Examples閮ㄥ垎
Plugins Editor UI
浣犲彲浠ュ湪Plugins缂栬緫鐣岄潰涓湅鍒板凡缁忓畨瑁呯殑鎻掍欢銆?
鎻掍欢缂栬緫鍣ㄥ彲浠ヤ粠涓荤獥鍙h彍鍗曚腑璁块棶銆傛鐣岄潰鏄剧ず褰撳墠瀹夎鐨勬墍鏈夋彃浠讹紝骞跺厑璁告偍鍗曠嫭鍚敤鎴栫鐢ㄦ彃浠躲€?
浣犲彲浠ヤ娇鐢ㄥ乏杈圭殑鐣岄潰娴忚鎻掍欢鐨勭洰褰曘€傞€夋嫨涓€涓洰褰曞皢鍦ㄥ彸杈规樉绀鸿鐩綍涓嬫墍鏈夌殑鎻掍欢浠ュ強鎵€鏈夊瓙鐩綍涓嬬殑鎻掍欢銆?
涓诲垪琛ㄦ樉绀烘彃浠剁殑鍚嶇О鍥炬爣锛屽綋鍓嶇増鏈紝鎻忚堪鍙婁綔鑰咃紙鍜屽彲閫夌殑缃戦〉瓒呴摼鎺ワ級锛屼互鍙婅鎻掍欢鏄惁宸插惎鐢ㄣ€?/p>
浣犲彲浠ュ湪浣犵殑椤圭洰涓惎鐢ㄦ垨绂佺敤鎻掍欢鐨勪娇鐢ㄣ€?/p>
Anatomy of a Plugin锛堟彃浠跺墫鏋愶級
甯︽湁浠g爜鐨勬彃浠舵湁涓€涓簮鏂囦欢澶广€傝鏂囦欢澶瑰皢鍖呭惈涓€涓垨澶氫釜婧愪唬鐮佹ā鍧楁簮浠g爜銆傛敞锛氭彃浠堕€氬父閮戒細鍖呭惈浠g爜锛屼絾涓嶆槸蹇呴』鐨勩€傛煡鐪嬫彃浠朵腑鐨勪唬鐮佸彲鑾峰緱鏇村淇℃伅銆?/p>
瀵逛簬鏈夌潃浠g爜妯″潡鐨勬彃浠舵潵璇达紝杩欑被鎻掍欢鏈夌潃鑷繁鐨勪簩杩涘埗鏂囦欢澶癸紝鍏朵腑鍖呭惈璇ユ彃浠剁殑缂栬瘧浠g爜銆傛澶栵紝涓存椂鏋勫缓鐨勯」鐩枃浠跺皢琚瓨鍌ㄥ埌鎻掍欢鐩綍涓嬬殑涓€涓腑闂存枃浠跺す涓€?/p>
鎻掍欢鍙互鎷ユ湁鑷繁鐨勫唴瀹规枃浠跺す锛屽叾涓寘鍚鎻掍欢鐗瑰畾鐨勮祫婧愭枃浠躲€傛煡鐪嬫彃浠堕儴鍒嗙殑Content浠ヤ簡瑙f洿澶氫俊鎭€?/p>
娉細鎻掍欢涓嶆敮鎸侀厤缃枃浠躲€傝繖鏄垜浠鍦ㄨ€冭檻鍦ㄤ粖鍚庢坊鍔犵殑涓滆タ銆傚苟涓旀彃浠惰繕涓嶆敮鎸佽嚜宸辨淳鐢熸暟鎹紦瀛樺垎閰嶃€傝繖鏄垜浠璁″湪绋嶅悗娣诲姞鐨勪竴浜涗笢瑗裤€?/p>
Plugin Folders
鎻掍欢濮嬬粓浣嶄簬鎻掍欢鐩綍涓嬨€傚湪铏氬够寮曟搸涓鏋滆鎵惧埌杩欎簺鎻掍欢鐨勮瘽锛屽畠浠繀椤讳綅浜庝竴涓湁鏁堢殑鎼滅储璺緞涓€?/p>
Plugin type | Search path |
---|---|
Engine plugin | /UE4 root/Engine/Plugins/My Engine Plugin/ |
Game plugin | /My project/Plugins/My Game Plugin/ |
浣犱篃鍙互璁叉彃浠舵斁鍏lugins鏂囦欢澶逛笅鐨勫瓙鐩綍涓€傚紩鎿庡皢浼氳嚜鍔ㄦ壂鎻忓苟鍔犺浇Plugins涓嬬殑鎵€鏈夊瓙鏂囦欢澶逛腑鐨勬彃浠讹紝浣嗗綋涓€涓洰褰曚腑鎵惧埌瀛樺湪鎻掍欢鍚庝究涓嶄細缁х画鎵弿璇ョ洰褰曠殑瀛愮洰褰曘€?/p>
铏氬够寮曟搸閫氳繃鎼滅储 纾佺洏涓婄殑.uplugin鏂囦欢鑰屾壘鍒版彃浠躲€傚彲绉拌繖浜涙枃浠朵负鎻掍欢鎻忚堪绗︺€傚畠浠槸鏂囨湰鏂囦欢锛屾彁渚涘叧浜庢彃浠剁殑鍩烘湰淇℃伅銆傜▼搴忚繍琛屾椂锛屾彃浠舵弿杩扮灏嗚铏氬够寮曟搸鍙戠幇鍚庡皢琚嚜鍔ㄥ姞杞姐€傛煡鐪婸lugin descriptor閮ㄥ垎浠ヤ簡瑙e垱寤哄拰鑷畾涔夎繖浜涙枃浠躲€?/p>
Code in Plugins
鐢熸垚Visual Studio鎴朮Code鏂囦欢椤圭洰鏂囦欢鏃讹紝浠讳綍鏈夌潃婧愭枃浠跺す鐨勬彃浠讹紙*.Build.cs鏂囦欢锛夐兘灏嗚娣诲姞鍒伴」鐩枃浠朵腑浠ヤ娇寰楁洿瀹规槗鎵惧埌瀹冧滑鐨勬簮浠g爜銆傚綋缂栬瘧娓告垙椤圭洰鏃讹紝Unreal Build Tool灏嗚嚜鍔ㄧ紪璇戣繖浜涙彃浠躲€?/p>
鎻掍欢鍙互鏈変换鎰忔暟閲忕殑妯″潡浠g爜鐩綍銆傚ぇ澶氭暟鎻掍欢鍙湁涓€涓ā鍧楋紝浣嗘槸鍙互鍒涘缓澶氫釜妯″潡锛屼緥濡傦紝濡傛灉鏈変竴浜涘姛鑳芥槸涓虹紪杈戝櫒璁捐鐨勶紝鍏朵粬閮ㄥ垎浠g爜鏄繍琛屾父鎴忔椂蹇呴』鐨勩€?/p>
澶у鏁版儏鍐典笅锛屾彃浠剁殑婧愭枃浠舵牸寮忓拰鍏朵粬C++妯″潡鍦ㄨ櫄骞诲紩鎿庝腑鏄竴鏍风殑銆?/strong>
鎻掍欢鍏佽鍦ㄦā鍧楁枃浠朵唬鐮佺敵鏄庢柊鐨刄Object绫诲瀷锛圲CLASS锛孶STRUCT绛夛級锛屾彃浠跺彲浠ュ湪妯″潡浠g爜鏂囦欢澶圭殑瀛愮洰褰曚腑鐨勫ご鏂囦欢閲屽0鏄庢柊鐨刄Object绫诲瀷銆傝櫄鎷熷紩鎿庢瀯寤虹郴缁熶細妫€娴嬭繖浜涙枃浠跺苟鐢熸垚鏀寔杩欎簺UObjects鐨勪唬鐮併€備綘闇€瑕侀伒寰湪C++妯″潡涓娇鐢║Objects鐨勯€氱敤瑙勫垯锛屼緥濡傚寘鍚敓鎴愮殑澶存枃浠朵互鍙婂湪妯″潡婧愭枃浠朵腑妯″潡鐨刧enerated.ini鏂囦欢銆?/p>
鈥淧ublic鈥?婧愭枃浠剁殑澶存枃浠舵槸涓€涓笌鎻掍欢妯″潡鏈夌偣涓嶅悓鐨勪笢瑗裤€傚湪Public婧愭枃浠跺す涓ぇ澶氭暟鎻掍欢妯″潡閮芥病鏈夊湪澶存枃浠朵腑閮芥病鏈夊叕鍏辩殑涓氬姟鎺ュ彛锛屽洜涓哄畠浠案杩滀笉浼氬拰寮曟搸鎴栨父鎴忎唬鐮佹湁鐩存帴渚濊禆鍏崇郴锛堥潤鎬侀摼鎺ワ級銆傛墍浠ラ€氬父浣犵殑Public婧愭枃浠跺す閮芥槸绌虹殑銆備絾鏄繖鏉¤鍒欎篃鏈夊嚑涓緥澶栵細
Content in Plugins
铏氬够寮曟搸鏀寔鍖呭惈Content鍙婁簩杩涘埗浠g爜鐨勬彃浠躲€傝繖椤瑰姛鑳戒粛鍦ㄥ畬鍠勪腑銆?/p>
涓轰簡鍦ㄦ彃浠朵腑浣跨敤Content锛屾彃浠舵弿杩扮鐨凜anContainContent璁剧疆蹇呴』涓簍rue銆傛彃浠剁殑Content鏄竴涓粛鍦ㄥ畬鍠勪腑鐨勭壒鎬э紝鐩墠杩樹笉寤鸿浣跨敤銆傛洿澶氬叧浜庤繖鐐圭殑淇℃伅灏嗗湪鏃ュ悗鎻愪緵銆?/p>
鎴戜滑鎵撶畻鏀寔鍏佽鍐呭琚寘鎷湪鍒嗗竷寮忕殑鎻掍欢涓€傛鍔熻兘灏氭湭瀹屽叏瀹炵幇锛屽洜姝や笉寤鸿浣跨敤瀹冦€?/p>
Plugins in your Game Project
鍦ㄦ父鎴忛」鐩洰褰曚笅锛屾彃浠跺瓨鍦ㄤ簬鍚嶄负鈥淧lugins鈥濈殑瀛愮洰褰曚笅锛屽苟鍦ㄥ惎鍔ㄧ殑鏃跺€欒娓告垙寮曟搸鍜岀紪杈戝櫒妫€娴嬪拰鍔犺浇銆?/p>
濡傛灉鎻掍欢涓瓨鍦ㄥ寘鍚簮鏂囦欢澶癸紙浠ュ強*.Build.cs鏂囦欢锛夌殑妯″潡锛屾彃浠朵唬鐮佸皢琚嚜鍔ㄦ坊鍔犲埌鐢熸垚鐨凜++椤圭洰鏂囦欢涓紝杩欐牱鐨勮瘽灏卞彲浠ュ緢瀹规槗鐨勫湪寮€鍙戞父鎴忛」鐩殑鍚屾椂寮€鍙戞彃浠躲€傚綋缂栬瘧娓告垙椤圭洰鏃讹紝鎵€鏈夊瓨鍦⊿ource鐨勬彃浠堕兘璁茶缂栬瘧鎴愪竴绉嶆父鎴忕殑鍚堟垚渚濊禆锛坰ynthetic dependency锛夈€?/p>
娌℃湁Source瀛愭枃浠跺す鐨勬彃浠跺皢琚」鐩敓鎴愬櫒蹇界暐锛屽苟涓斾笉浼氬嚭鐜板湪C++椤圭洰鏂囦欢涓紝浣嗗彧瑕佷簩杩涘埗鏂囦欢瀛樺湪渚夸細鍦ㄦ父鎴忓惎鍔ㄦ椂琚姞杞姐€?/p>
Engine Plugins
UE4鏈変竴浜涘唴缃殑鎻掍欢鍖呭惈鍦ㄥ紩鎿庣洰褰曚笅銆傚紩鎿庢彃浠跺氨鍍忎綘鍦ㄦ父鎴忎腑鎵€鎷ユ湁鐨勬彃浠讹紝 骞朵笖鍙互鐢ㄤ簬鎵€鏈夌殑娓告垙椤圭洰涓€傞€氬父鎯呭喌涓嬶紝杩欎簺鎻掍欢鏄湁寮曟搸鍜屽伐鍏风▼搴忓憳鎻愪緵涓€涓被浼兼彃浠剁殑鍩哄噯鍔熻兘銆備娇寰楃敤鎴峰彲浠ュ垹闄ゆ垨閲嶅啓鏁翠釜寮曟搸鍔熻兘鑰屼笉淇敼浠讳綍寮曟搸浠g爜銆?/p>
榛樿鎯呭喌涓嬶紝寮曟搸鎻掍欢鐨勫姞杞藉湪鎵€鏈夋父鎴忔ā鍧楁垨娓告垙椤圭洰鍔犺浇涔嬪墠銆?/p>
寮曟搸鎻掍欢鏈変竴涓壒鍒殑瑕佹眰锛氬紩鎿庝唬鐮佹ā鍧椾笉鑳藉闈欐€侀摼鎺ュ紩鎿庢彃浠舵ā鍧楀簱銆傚嵆锛屽紩鎿庢彃浠跺繀椤讳笌寮曟搸鏈韩鐙珛寮€锛屾彃浠舵ā鍧楁槸寮曟搸妯″潡鐨勨€滀緷璧栨ā鍧椻€濄€傝繖鏄竴绉嶆槑鏅虹殑閫夋嫨锛屽綋鎻掍欢涓嶅彲鐢ㄦ椂寮曟搸浠嶅彲缁х画宸ヤ綔銆?/p>
Distributing a Plugin
浠ヤ笅鏄彂甯冩彃浠舵墍闇€鐨勬楠ゃ€?/p>
閲嶈绗旇锛?/p>
Plugin Descriptor files
鎻掍欢鎻忚堪绗︽槸浠?uplugin鎵╁睍鍚嶇粨灏剧殑鏂囦欢銆傛枃浠跺悕鐨勭涓€閮ㄥ垎鏄彃浠剁殑鍚嶅瓧銆傛彃浠舵弿杩版枃浠舵€绘槸浣嶄簬鎻掍欢鐩綍涓嬶紝寮曟搸浼氬湪鍚姩鏃跺彂鐜板畠浠€?/p>
鎻掍欢鎻忚堪绗﹀湪JSON锛圝avaScript Object Notation锛夋枃浠舵牸寮?/p>
Descriptor File Example
姝ゅ疄渚嬫彃浠舵弿杩扮鏄粠UObjectPlugin涓嬭浇鐨勪緥瀛愩€?/p>
{
"FileVersion" : 3,
"FriendlyName" : "UObject Example Plugin",
"Version" : 1,
"FriendlyVersion" : "1.0",
"EngineVersion" : 1579795,
"Description" : "An example of a plugin which declares its own UObject type. This can be used as a starting point when creating your own plugin.",
"Category" : "Programming Examples.Plugins",
"Modules" : [ { "Name" : "UObjectPlugin", "Type" : "Developer" } ]
}
Content in Plugins for more info.
Modules
Optional
For plugins that contain source code (and binaries), this is the list of modules that should be loaded at startup. See below for more info.
杩欑.uplugin鐨勬枃浠舵牸寮忎粛鍦ㄥ畬鍠勫苟瀛樺湪鏀瑰彉鐨勫彲鑳姐€備緥濡傦紝鎴戜滑棰勮鐗堟湰鎺у埗鐨勬柟寮忓皢鍦ㄥ悗缁殑Release鐗堜腑淇敼銆?
鎻掍欢鍚嶇О鍜屾弿杩板瓧绗︿覆瀹氫綅灏氭湭鏀寔锛屽苟涓擥UI涓殑瀹炵幇鏂囧瓧鏄剧ず浣嶇疆鐨勫畾浣嶆槸涓嶆敮鎸佺殑銆?/p>
Module Descriptors
杩欑.uplugin鐨勬枃浠舵牸寮忎粛鍦ㄥ畬鍠勫苟瀛樺湪鏀瑰彉鐨勫彲鑳姐€備緥濡傦紝鎴戜滑棰勮鐗堟湰鎺у埗鐨勬柟寮忓皢鍦ㄥ悗缁殑Release鐗堜腑淇敼銆?
鎻掍欢鍚嶇О鍜屾弿杩板瓧绗︿覆瀹氫綅灏氭湭鏀寔锛屽苟涓擥UI涓殑瀹炵幇鏂囧瓧鏄剧ず浣嶇疆鐨勫畾浣嶆槸涓嶆敮鎸佺殑銆?/p>
瀵逛簬鍖呭惈浠g爜鐨勬彃浠讹紝鎻忚堪绗︽枃浠跺皢鍖呭惈鑷冲皯涓€涓ā鍧楁弿杩扮銆?/p>
{
"Name" : "UObjectPlugin",
"Type" : "Developer"
}
Field | Info | Description |
---|---|---|
Name | Required | Unique name of this plugin module that will be loaded with the plugin. At runtime, the engine will expect appropriate plugin binaries to exist in the plugin鈥檚 Binaries folder with the module name as specified here. For modules that have a Source directory, a matching *.Build.cs file is expected to exist within the module鈥檚 subfolder tree. |
Type | Required | Sets the type of module. Valid options are Runtime, RuntimeNoCommandlet, Developer, Editor,EditorNoCommandlet, and Program. This type determines which types of applications this plugin鈥檚 module is suitable for loading in. For example, some plugins may include modules that are only designed to be loaded when the editor is running. Runtime modules will be loaded in all cases, even in shipped games. Developer modules will only be loaded in development runtime or editor builds, but never in shipping builds. Editor modules will only be loaded when the editor is starting up. Your plugin can use a combination of modules of different types. |
LoadingPhase | Optional | If specified, controls when the plugin is loaded at startup. This is an advanced option that should not normally be required. The valid options are Default (which is used when no LoadingPhase is specified),PreDefault, and PostConfigInit. PostConfigInit allows the module to be loaded before the engine has finished starting up key subsystems. PreDefault loads just before the normal phase. Typically, this is only needed if you expect game modules to depend directly on content within your plugin, or types declared within your plugin鈥檚 code. |
Icon Files
闅忕潃鎻忚堪绗︽枃浠讹紝鎻掍欢閫氬父鏈変竴涓浘鏍囨枃浠讹紝鐢ㄤ簬鍦ㄧ紪杈戝櫒UI涓樉绀烘彃浠躲€?/p>
File Name | Info | Format | Description |
---|---|---|---|
/Resources/Icon128.png | Required | 128x128 PNG file | This icon represents this plugin in the editor UI. It will be displayed in the 鈥楶lugins鈥?user interface accessible from the main Window menu. |
Plugin Examples
鎴戜滑宸茬粡鍒涘缓浜嗕竴浜涙病鏈変换浣曞姛鑳界殑瀹炰緥鎻掍欢銆傚彲浠ュ湪鍒涘缓鎻掍欢鏃朵綔涓虹┖澹充娇鐢ㄣ€傝繖浜涢兘鍖呭惈鍦ㄥ紩鎿庢簮浠g爜涓€?/p>
Example Name | Info |
---|---|
BlankPlugin | This plugin is an empty shell that shows the bare minimal files needed to setup a new code plugin module. |
UObjectPlugin | A simple empty plugin that demonstrates how to declare your own UObject class. |
鍦╓indow -> Developer宸ュ叿鑿滃崟涓嬩綘鍙互鐪嬪埌琚姞杞界殑鎻掍欢銆傚彟涓€涓柟寮忔槸浣跨敤浠g爜璋冭瘯鍣ㄥ湪鎻掍欢鍚姩浠g爜涓缃柇鐐癸紝渚嬪鍦‵BlankPlugin::StartupModule()涓缃柇鐐?