What’s the difference between “Cook” and “Build” in Unreal Engine 5?

The Lazy Indian Techie
3 min readMay 3, 2023

--

A friendly introduction to understanding the difference between building and cooking in Unreal Engine for newcomers

Photo by Chinh Le Duc on Unsplash

Hey there, fellow indie game devs 😃 I remember when I first started working with Unreal, there were so many things to learn, and sometimes it felt a bit overwhelming. One of the concepts that initially confused me was the difference between the “Build” and “Cook” options in the engine. Coming from Unity, everything seemed so much more complicated in Unreal Engine. It still does!!

As someone who’s been through the learning process, I’m here to share my insights and help you navigate these two weird parts of UE!

To “Build” or to “Cook”, that is the question!

Building Your Game: Project Specific

In the world of Unreal Engine, the term “Build” refers to the process of constructing various elements of your game project. This option is an integral part of development, as it involves compiling and assembling the different components of your game within the editor. When you build your project, Unreal Engine performs several essential tasks:

  1. Compiling Code: The engine takes your C++ and Blueprint scripts and compiles them, incorporating any recent changes or updates you’ve made.
  2. Constructing Lighting: Unreal Engine computes and bakes static lighting information into your level, ensuring visually accurate and pleasing results. This process includes generating lightmaps, capturing reflections, and calculating other precomputed lighting data.
  3. Generating Navigation Data: To ensure that AI characters can navigate your game world effectively, Unreal Engine builds navigation data. This involves determining walkable surfaces, creating navigation meshes, and computing pathfinding information.
  4. Optimizing Geometry: The engine optimizes your level’s geometry by merging static meshes and applying various other optimizations.

The “Build” option is primarily intended for use during development, allowing you to fine-tune your game’s functionality and visual fidelity within the Unreal Engine editor.

Cooking Your Game: Platform Specific

In contrast, the “Cook” option focuses on optimizing and preparing your game assets and content for specific target platforms such as PCs, consoles, or mobile devices. Cooking your game is an essential step before deployment, ensuring optimal performance and compatibility. The cooking process consists of several key steps:

  1. Converting Assets: Unreal Engine converts your assets into formats that are better suited for the target platform. This may involve compressing textures, optimizing models, or adapting content to meet specific hardware requirements.
  2. Compiling Shaders: The engine compiles your shaders for the target platform’s graphics API (e.g., DirectX, Vulkan, or Metal), ensuring optimal rendering performance.
  3. Packaging Content: Cooked content is packaged into efficient file formats (e.g., PAK files) that allow the game engine to load and access data quickly during runtime.
  4. Optimizing Data: The cooking process may involve additional optimizations, such as generating navigation data or calculating level of detail (LOD) information.

To sum up, the “Build” option deals primarily with the compilation and construction of your game’s various elements during development, while the “Cook” option optimizes and prepares your game assets for deployment on target platforms.

Bonus: For Unity developers

If, like me, you’re from Unity, you might be confused and expect that Build will just Build out your game. In fact, Build just does the whole “Domain reload” and other things that happen in Unity when you switch back from C# or when you manually build lighting. “Cook” by the way actually does the act of “Switch Platform” in Unity.

To actually build the game, you don’t build it but Package the Project in Unreal. I know, it’s confusing, messy. Not sure if that’s because I come from Unity. But hope this article made it a little easier to understand the differences.

Do leave a comment and let me know about yourself, what are you working on, which platform you use and anything else you want to share!

--

--

The Lazy Indian Techie

Gamer turned Game Developer. Techie, Geeky, All that... Exploring my writing whilst sharing my journey...