Simple creation of custom modules in UE4

This article only briefly introduces the method of creating custom modules

1. Create a new project and create the new module we want to add in the Source folder 2. And create 3 files with
write picture description here
.h .cpp .Build.cs suffixes in the newly created NewModule folder
write picture description here
3. Enter VS to build NewModule (filter ) and drag the newly created 3 files in the folder just now into NewModule
write picture description here
4. Add content for NewModule.Build.cs (copy directly from TestModule.Build.cs in our project)
write picture description here
Pay attention to the name to ensure that the correct modification
will also You can copy the .h and .cpp files, and you also need to pay attention to the modification of the name

5. Enter the uproject of the project and add our new module
write picture description here
6. Finally, add a new module name to .Target.cs in the project. Both
write picture description here
.Target.cs suffixes need to add the module name
7. Close the project and recompile VS, Create Actor under NewModule
write picture description here
so that our custom module is displayed!
If there is a problem, close the project and just open VS and recompile.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325214858&siteId=291194637