Cook on the fly
When you choose to cook content on the fly (COTF), it will delay cooking it until after the game has been deployed to the platform. Only the executable and some other basic files are installed, which use network communication with a Cook Server to make requests on-demand as the content is needed. COTF allows for faster iteration for developers who will be making changes to content regularly or those who will only be exploring sections of the game.
To cook on the fly, you will first need to start a Cook Server on a machine which has the full project available to it. This can be either your local machine or a remote server which performs the cook. The Cook Server can be run by starting the Editor in command line mode using the following arguments with the UE4Editor-cmd.exe:
UE4Editor-cmd.exe [FullAbsolutePathToProject.uproject]-run=cook -targetplatform=Windows -cookonthefly
On the developer's local machine, access a Custom Launch Profile from the Project Launcher and in the Deploy Section, set the method to File Server. Optionally, you can use the Default Deploy Platform to select a single platform or use the toggles to enable multiple platforms to build and deploy to.
For the executable to know where to load content from, it needs to be made aware of the IP address of the machine that is running the Cook Server. To do this, you will need to pass the following command line argument on the client's command line (where x.x.x.x represents your host's IPs):
The argument can be specified in your custom launch profile under the Launch section in the Additional Command Line Parameters text box. If the IP address is left unspecified, the build will load from existing local files and not attempt to connect to the Cook Server.
For additional information about this cook method and its available settings, refer to the Project Launcher reference page.