




🌟 Special thanks to our amazing supporters:
✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]
A week fraught with hardship and frustration. Battling deadlines and the very essence of Unreal Engine 5 itself
But now, devlog time!
--- Author: Carl "Floof" Appelkvist ---
Hello everyone, this is a continuation of our new weekly devlogs. This week its my turn at the helm. My main focus this week has been fixing some pesky packaging issues with our game.
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 its an excellent plugin, when in the editor.
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 shouldnt need to depend on an editor-only plugin when running. And then the pain started, errors left and right. Enabling it again didnt 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).
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 ill 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 youll find your base module with the type Runtime, for us its Maskinspelet. Now youll 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. Theres no reason to declare your dependencies here, its 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 dont 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;
}
[ 6080 ]
[ 1321 ]
[ 4061 ]