UE4簡單建立自定義模組

2021-08-26 02:33:11 字數 1126 閱讀 7698

1. 新建專案並在source資料夾下建立我們要新增的新模組

2. 並在新建的newmodule資料夾下建立.h .cpp .build.cs 字尾的3個檔案

3.進入vs建立newmodule(篩選器)並把剛才資料夾裡新建立的3個檔案拖入newmodule下

4.為newmodule.build.cs新增內容(直接從我們專案裡的testmodule.build.cs拷貝即可)

注意名字確保正確修改

同樣將.h和.cpp檔案複製即可,同樣需要注意名字的修改

5. 進入專案的uproject內新增我們的新模組

6. 最後在專案裡的.target.cs裡新增新的模組名

2個.target.cs字尾的都需要新增模組名

7. 關閉專案重新編譯vs,在newmodule下建立actor

這樣我們自定義的模組就顯示出來了!

如果出現問題關閉專案只開啟vs重新編譯即可。

UE4 自定義DLC Pak載入

廢話不說,直接上乾貨 htsharedptr class fpakplatformfile pakplatform class iplatformfile oldplatform load void loadandmountpak const fstring inpath cpp void udlc...

UE4之自定義引擎類

可參考 新建umyengine類繼承自ugameengine class umyengine public ugameengine 在配置檔案defaultengine.ini中將引擎類修改為新的類 script engine.engine gameengine script mymodulenam...

UE4 自定義結構體 類 資料表

自定義資料表 pragma once include coreminimal.h include engine userdefinedstruct.h include components canvaspanel.h include blueprint userwidget.h include ru...