Render through python command wait until shaders have been compiled

We are wanting to render a level sequence through a command but have that command wait until all the shaders have been complied. What would be the best way to do this? We are using game mode to render.

Should we simply be using a derived data cache? Or is there another way?

I can’t help you with pyton, but it sounds like it is all possible with just the commandline! Have look in the wiki A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums and in the docs
to filling up the derived data cache use “UE4Editor.exe ProjectName -run=DerivedDataCache -fill” - I guess if you daisy chain those to commands it makes what you want.

ot, would be curious how your game mode looks like when you use it for render

Hi Andoh,
Thanks for the tips. We had run the -fill and had the derived data cache set but still the shaders needed to compile. I’m thinking that having the -fill command run before every render might guarantee that it always works.

yes that sounds strange. normally shaders compile once, not every time you load the project. if it recompiles every time at your side something is wrong. do you have any logs? (Project/saved/logs folder)

The following commands should do the trick


My experience is; in order for the above code to take effect… the following command also also needs to be called.


which the above seems to be pointless.