Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Commandline baking not saving sublevels

Since moving from 4.19 to 4.21 I've had trouble using the commandline to bake static lighting in regards to sublevels. Previously in 4.19 it would save lightmaps to the referenced sublevels as well, now with 4.21 the information in the sublevels is definitely affecting the bake for the persistent level that I have chosen to bake, however none of the lightmaps are saving to the sublevels as well.

'UE4Editor-Cmd.exe "C:ProjectPath\ProjectName.uproject" -run=resavepackages -buildlighting -allowcommandletrendering -map=Level.umap'

I've been using the above format to bake and have had no issues prior to 4.21, do I need to do something different to achieve the same results?

Product Version: UE 4.21
more ▼

asked Mar 14 '19 at 12:22 PM in Rendering

avatar image

6 1

avatar image RVillani Mar 30 '19 at 09:32 PM

Been wondering the same. Just tried to use it today and the only level saved was the one in the command. All the other 10 sublevels were left intact.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Found and fixed the bug here on 4.20. Looks like it was a typo, comparing the wrong map name. Here's a fix:

             // If everything is a success, resave the levels.
             if( bShouldProceedWithRebuild )
                 for (ULevelStreaming* NextStreamingLevel : World->GetStreamingLevels())
                     FString StreamingLevelPackageFilename;
                     const FString StreamingLevelWorldAssetPackageName = NextStreamingLevel->GetWorldAssetPackageName();
                     const bool bPackageExists = FPackageName::DoesPackageExist(StreamingLevelWorldAssetPackageName, NULL, &StreamingLevelPackageFilename);
                     const bool bPackageIsSublevel = SublevelFilenames.Contains(StreamingLevelPackageFilename);
                     if (bPackageExists && bPackageIsSublevel)

Note: the fix is to to compare SublevelFilenames for StreamingLevelPackageFilename not StreamingLevelWorldAssetPackageName

more ▼

answered Apr 18 '19 at 07:19 PM

avatar image

Tyler Shaub
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question