O'Reilly logo

Unreal Engine 4 Scripting with C++ Cookbook by Stephen Whittle, William Sherif

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a new editor module

The following recipes all interact with editor mode-specific code and engine modules. As a result, it is considered good practice to create a new module that will only be loaded when the engine is running in editor mode so that we can place all our editor-only code inside it.

How to do it…

  1. Open your project's .uproject file in a text editor such as Notepad or Notepad++.
  2. Add the bolded section of the following to the file:
    {
      "FileVersion": 3,
      "EngineAssociation": "4.11",
      "Category": "",
      "Description": "",
      "Modules": [
        {
          "Name": "UE4Cookbook",
          "Type": "Runtime",
          "LoadingPhase": "Default",
          "AdditionalDependencies": [
            "Engine",
            "CoreUObject"
          ]
        },
        {
          "Name": "UE4CookbookEditor",
          "Type": "Editor",
     "LoadingPhase": "PostEngineInit", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required