We encountered an issue where the cook would occasionally fail for local users when using ushell. We tracked the issue down to some users running the Editor in DebugGame, but the ushell cook was launching an old, outdated Editor Development build instead. I had a look at the cook.py and it looks to currently support Debug and Development, but not DebugGame, so we weren’t able to pass that as a option as part of our channel extensions.
We were hoping to confirm if this was the right approach, or if it meant we weren’t using ushell as you would expect / recommend?
We were able to patch it locally with some small additions. We added debuggame as a new option for the _Cook and then updated the variant check on line #53 to check for it. These are the changes we made in Engine\Extras\ushell\channels\unreal\core\cmds\cook.py:
// Original (Line #27)
class _Cook(unrealcmd.MultiPlatformCmd):
cookargs = unrealcmd.Arg([str], "Additional arguments passed to the cook commandlet")
cultures = unrealcmd.Opt("en", "Cultures to cook (comma separated, defaults to 'en')")
onthefly = unrealcmd.Opt(False, "Launch as an on-the-fly server")
iterate = unrealcmd.Opt(False, "Cook iteratively on top of the previous cook")
noxge = unrealcmd.Opt(False, "Disable XGE-based shader compilation")
unpretty = unrealcmd.Opt(False, "Turns off colourful pretty-printing")
attach = unrealcmd.Opt(False, "Attach a debugger to the cook")
build = unrealcmd.Opt(False, "Build editor binaries prior to cooking")
debug = unrealcmd.Opt(False, "Use debug executables")
nounattended = unrealcmd.Opt(False, "Skip implicitly specified '-unattended'")
versioned = unrealcmd.Opt(False, "Skip implicitly specified '-unversioned'")
// New
class _Cook(unrealcmd.MultiPlatformCmd):
cookargs = unrealcmd.Arg([str], "Additional arguments passed to the cook commandlet")
cultures = unrealcmd.Opt("en", "Cultures to cook (comma separated, defaults to 'en')")
onthefly = unrealcmd.Opt(False, "Launch as an on-the-fly server")
iterate = unrealcmd.Opt(False, "Cook iteratively on top of the previous cook")
noxge = unrealcmd.Opt(False, "Disable XGE-based shader compilation")
unpretty = unrealcmd.Opt(False, "Turns off colourful pretty-printing")
attach = unrealcmd.Opt(False, "Attach a debugger to the cook")
build = unrealcmd.Opt(False, "Build editor binaries prior to cooking")
debug = unrealcmd.Opt(False, "Use debug executables")
debuggame = unrealcmd.Opt(False, "Use DebugGame executables")
nounattended = unrealcmd.Opt(False, "Skip implicitly specified '-unattended'")
versioned = unrealcmd.Opt(False, "Skip implicitly specified '-unversioned'")
// Original (Line #53)
variant = "debug" if self.args.debug else "development"
// New
if self.args.debug:
variant = "debug"
elif self.args.debuggame:
variant = "debuggame"
else:
variant = "development"
[Attachment Removed]