MapToCook - Path relative to editor and not Project


If you go to the package settings panel and select the map to cook (to not cook your WIP map or test map), the map are referenced in the Default.Ini file based on their “relative path to the editor”.

For me it’s the bug in the implemenation and it’s should be relative to the Project.
In my opinion, Editor install path should not be hard link to any project. It’s clear not error prone. If you have a build machine, you can’t be sure of where you Install is done, more, if you are using “built from source” editor to have linux build but your programmer is using the launcher editor, you can bet that you won’t have the same path.

Could you please fix this or (if it is the designed behavior) provide a way to select properly the map to cook relative to the project? (more or less what “[AllMaps]” section from Editor.ini was doing, but with a UI to configure it).

More, could you please explain me what the purpose of the parameter: bCookSinglePackage in the package code and when it can be set to true? (as true means do not use MapToCook parameters). It is important so I can understand when my settings will be taken into account.



Have you been able to reproduce the issue? Is it by design? If so, what are the best practices to handle maps selection for cooking?


Hello ,

I’ve reproduced the problem with the “Maps to Cook” not working correctly due to the change in directory but I’m currently looking into if it is intended or not. I’ll also look into that boolean that you referenced and let you know.

I’ve placed a bug in for this issue of the MapsToCook not being relative to the directory of the project. For reference, the bug number is UE-27785. As far as the other question about the bCookSinglePackage boolean, when you say “when it can be set to true” do you mean that you’re looking for what point in the code it can be set to true where it will still use the MapToCook parameters?

Hi ,

As a work around for this issue you can just remove the path to the map from the dialog.
For example, change

without the extension on it.

The cooker will go find it if it’s in this format.
I’ll have a look and see if we can make handling this dialog better.


turns in to

ok great to know. So it can handle the same format as : AllMaps.

For “bCookSinglePackage”, yes I’m wondering what could change the value of this variable, to understand in which context the MapsToCook won’t be taken into account.

Are you looking to change this variable yourself or is this happening somewhere in the engine and you’re wondering where/why it is being changed?

If fact, I just want to understand when the engine change the value of bCookSinglePackage but I can’t find it.

I don’t want to do anything with this, but as it is a constraint to the usage of the maps settings, I want to understand when and when not my setting will be taken into account.

I understand. It seems that the only time that this value is ever set is in the UCookCommandlet’s Main function. It seems to only be set to true if “cooksinglepackage” is part of the commandline parameters passed to it. Other than that line and lines where bCookSinglePackage is used for conditional statements, it doesn’t seem that this variable is mentioned anywhere else.

Thanks for the answer.

cooksinglepackage Is this parameter linked to somewhere in the Editor UI? I just want to be sure, that if I’m using the Chunk approach at some time, my maps will be there :smiley:

Do you know if some improvment have been made on UE-27785 in 4.11 / 4.12?

I’m actually not sure about your first question, to be honest. As far as when the fix for UE-27785 will be in, it’s currently marked for 4.12 release. There could be changes that cause it to get pushed back, for compatibility reasons and the like, so I can’t guarantee it but that is what it currently says.

Thanks for your update. I try to dig and see if there is a UI mapped to this parameter.

Good news for 4.12.

bCookSinglePackage will force to exclude InputPackages ,DefaultMaps ,SlatePackages and some other things during cooking procedure.
it basically is there to faster the cooking procedure.

the full definition is here

   const ECookByTheBookOptions SinglePackageFlags = ECookByTheBookOptions::NoAlwaysCookMaps | ECookByTheBookOptions::NoDefaultMaps | ECookByTheBookOptions::NoGameAlwaysCookPackages | ECookByTheBookOptions::NoInputPackages | ECookByTheBookOptions::NoSlatePackages | ECookByTheBookOptions::DisableUnsolicitedPackages | ECookByTheBookOptions::ForceDisableSaveGlobalShaders;
	CookOptions |= bCookSinglePackage ? SinglePackageFlags : ECookByTheBookOptions::None;

to see its impact u have to go to:
and search for this lines:

if (!(FilesToCookFlags & ECookByTheBookOptions::NoDefaultMaps))
if (!(FilesToCookFlags & ECookByTheBookOptions::NoInputPackages))
if ( !(FilesToCookFlags & ECookByTheBookOptions::NoSlatePackages))

do same for other flags of SinglePackageFlags and u will find their impacts.