Tutorial
Documentation for the Osero Suite: Module Creator update 1.1 (5.2+)
Last updated
Documentation for the Osero Suite: Module Creator update 1.1 (5.2+)
Last updated
The Osero Suite: Module Creator is an Unreal Engine editor tool that offers a quick and easy solution for creating new C++ modules for a uproject or uplugin. It removes the hassle of manually copying and creating code files and replaces it with the simple click of a button! The tool includes settings for module type and loading phase, and also has support for module templates and source control, making the process of creating new C++ modules super easy and simple.
Once the Osero Suite: Module Creator plugin is installed, the Module Creator can be accessed via the Osero Suite menu in the Level Editor Toolbar or the Window menu.
To create a new module, the first thing needed is a name.
The Module Creator will replace invalid characters with an underscore to make sure it fits with Unreal Engine’s naming convention.
The module type and loading phase then need to be defined.
The Module Creator uses a special Data Asset called a “Module Template” in order to know what files to create. The default template is a copy of the Blank Plugin template from the Plugin Manager and will create a Build.cs, module header, and module cpp file.
The new module then needs a destination. This can be either the current project, an existing project plugin, or a new project plugin. The tool will automatically create or update the relevant uproject or uplugin files.
The final option is whether or not to check Revision Control for any files created or modified. This saves having to manually check out files or mark them for add when using Source Control like Perforce.
When “Create Module” is clicked, the Module Creator will then use all the settings to create and modify the relevant files. The project files will then be regenerated to add the module into the Visual Studio solution. Then, based on your Hot Reload and Live Coding settings, the project will recompile the solution with the new module included.
It should be noted that sometimes new modules will not immediately show up despite Hot Reload or Live Coding. To fix this, close Unreal Engine and manually build from Visual Studio.
A core feature of the Module Creator is Module Templates. Module Templates are special Data Assets that contain information about what files to create when building a new module. By default, the tool uses OS_MDC_DefaultTemplate_Data, which is a basic module with no custom code.
The plugin also comes with an example of a custom Module Template called OS_MDC_Template_OseroSuiteEditorTool, which is a copy of a basic Osero Suite tool module with no custom code.
To create a new Module Template, simply click the plus button under the Module Template field.
The new Module Template will be a copy of the default template and can be modified as needed.
Module Templates have three buttons at the top.
Copy Existing Module will replace all the data in this template with the imported data from an existing module in the current project.
Export to Json will create a new Json file with all of the data in this template for easy copying between projects or editing in an external program.
Import from Json will replace all the data in this template with the imported data from a valid Json file.
The essentials of a module include the module header, module cpp, and Build.cs files. If any of these are left blank, the tool will abort and not create a new module.
Keys allow the user to modify data in a template automatically when the new module is created.
Default keys are internal keys used behind the scenes and can be used in most text fields of the module template. Clicking any of these keys will copy it so that it can be easily pasted into the text fields.
Custom keys allow the user to set additional keys to be replaced in the module creation process. Any keys defined here will appear in the Module Creator window when this template is being used to create a new module. In the example, there are two custom keys: {ID} and {Full Name}.
Additional Files are files other than the module header, module cpp, and Build.cs files. The example includes three additional files: S{ID}_Tool, {ID}_Style, and {ID}_Statics. Additional files can include a header, cpp, or “other” file. They can also include a subfolder, while the header and “other” files can be marked as Private, meaning they will be placed in the Private folder, rather than the public folder.
The Osero Suite: Module Creator also includes its own project settings. In these settings, the default template can be set.
The Osero Suite: Module Creator is a useful tool to save time when creating Unreal Engine C++ modules. For more information, visit docs.oserosuite.com.