Errors, Packaging & Pain

A week fraught with hardship and frustration. Battling deadlines and the very essence of Unreal Engine 5 itself…

But now, devlog time!

Hello everyone, this is a continuation of our new weekly devlogs. This week it’s my turn at the helm. My main focus this week has been fixing some pesky packaging issues with our game.

Devlog 9

Carl “Floof” Appelkvist

Average Headache Enthusiast

Editor Moment

We use a couple of plugins to aid in the production of Mechanical Sunset. We use FMOD for audio, Houdini for the creation of sick tools like our ivy tool and snow tool (check last weeks devlog) but none has been as problematic as Geometry Scripting. We use Geometry Scripting for our procedural machine walls and it’s an excellent plugin, when in the editor.

A screenshot of the console in Unreal Engine showing the erros in question
The errors in question.

Now, the hard part comes when trying to package the game for runtime (i.e taking the project files and turning them into the standalone game) as editor only plugins are not supported, this throws an error when packaging the game. So I thought, naively, “What if I just remove the plugin? It shouldn’t need to depend on an editor-only plugin when running”. And then the pain started, errors left and right. Enabling it again didn’t help and trying to make the base classes editor only really messed it up!

The Unreal Engine documentation really lacks in this department so I turned to Discord, and thanks to an amazing user over at the Unreal Engine Discord server we got it working, it now builds and runs smoothly out of editor. And the worst part was that it was a relatively simple fix, IF YOU KNEW TO DO THAT that is. And now.. You will know too! (This will get technical).

A plush of the Gumlin, Gumlin Games mascot
Emotional support gumlin for the ride.

First of all: https://unrealcommunity.wiki/creating-an-editor-module-x64nt5g3 ⇐ this is a great tutorial for making an editor module but there are some key things that arent in this tutorial that i’ll share with you.

Begin by checking your .uproject file, i use Notepad++ to edit its plugin and dependency settings:

Make sure your plugins are enabled, even if they are editor only.

    {
        "Name": "GeometryScripting",
        "Enabled": true
    }

Then go back to the top, here you’ll find your base module with the type “Runtime”, for us it’s “Maskinspelet”. Now you’ll have to make a similar module below, the key differences are changing the name, the type to “Editor” and i changed the loading phase:

"Modules”: [
    {
        "Name": "Maskinspelet",
        "Type": "Runtime",
        "LoadingPhase": "Default"
        
    },
    {
        "Name": "MaskinspeletEditor",
        "Type": "Editor",
        "LoadingPhase": "PostEngineInit"
    }
],

I also made an error here at first, in your .uproject file you might find the “AdditionalDependencies” line. Kill it with fire. There’s no reason to declare your dependencies here, it’s something reserved for the .Build.cs script, of which you create in the tutorial linked above. Having the “AdditionalDependencies” line AND declaring your dependencies in the build script WILL break it, so don’t do it. This was the main problem I encountered, and it was the problem the users of the Unreal Engine Discord helped me fix.

Also, when editing your new .Build.cs file, make sure to but your third party, editor only and experimental plugins (along with “UnrealEd”) in the private section:

PrivateDependencyModuleNames.AddRange(new string[] {"UnrealEd", "GeometryScriptingEditor" });

And last but definitely not least, the thing that brought it all together, addthe following to all your .build.cs scripts, even the runtime module. This bit of code was the thing that finally resolved the case.:

if (Target.Configuration == UnrealTargetConfiguration.DebugGame
                || Target.Configuration == UnrealTargetConfiguration.Debug)
        {
            bUseUnity = false;
        }

And to summarize

  1. Follow the linked tutorial, it’s good.
  2. Make sure “AdditionalDependencies” in your .uproject file is dead, forever.
  3. Absolutely don’t forget to add the dependencies into the .build.cs file, otherwise it’ll never work. And make sure they are in the private range.
  4. And definitely, absolutely, please-do-elly set “bUseUnity = false”, this will save your life, and program, as it did with us.

Whew, and all that had to be completed by this week. We promised a publisher that we’ll have it up on Steam before today. Also, this is my and Lukas “Gås” Rabhi Hallner’s last day of work before our vacation!

Taking some time off will be great and the rest of the Gumlin team will be hard at work to keep updates regular and prepare our game for Gamescom!

(Editors note, we’re not currently on vacation, this is just a re-upload of an old dev log to our website)

Keep looking out for our dev logs and don’t forget to…


Everything is better the second time.. Well, devlogs atleast.

~ The Gumlin

Leave a Comment