UFactory class in Development build issues.

Hi all,

I have my own factories to be used within the editor and they’re part of my main game project, when I build the development game I get errors because UFactory is part of the UnrealEd module…so my question is how do I only remove them from the game builds? I’ve tried creating a plugin for the factories but they need access to game classes which became messy quickly.


You need to create a second module in your project, in which you put any code that is editor-only (such as UFactory). You can set it up with just the same structure that the default created module has.
Then you make an entry in your .uproject file specifying that the module is editor-only:

    "Name": "MyEditorModule",
    "Type": "Editor"

Hi kamrann,

Thanks for your response, I created the factory module but the factory uses a class which is in and needed in the game module, I can’t figure out how to do this as you’ll get cyclic issues…unless I’m missing something?



I did the same yesterday, add your game module to the editorbuild.cs file

This is the topic about my custom asset: Level asset reference issue - C++ Gameplay Programming - Unreal Engine Forums

The file is located

So i added

and my build file (which reference the game module)

// Copyright 2015-2016 Deborggraeve Randy. All Rights Reserved.

using UnrealBuildTool;

public class SwatReloadedEditor : ModuleRules
    public SwatReloadedEditor(TargetInfo Target)
        PrivateIncludePathModuleNames.AddRange(new string]

        PublicDependencyModuleNames.AddRange(new string]
            "SwatReloaded", //<=== REFERENCE GAME MODULE

        DynamicallyLoadedModuleNames.AddRange(new string]

Hi Fallonsnest,

Thanks for replying, I’ve got it sorted now, seeing your ModuleRules helped.

Thanks again,