Want to learn Unreal Engine? Use the following link for a huge discount on a 10-hour Unreal Engine 5 Beginner's course: https://www.udemy.com/course/unreal-e...
Or, use the following link for a huge discount on a 19-hour Unreal Engine 5 Intermediate course: https://www.udemy.com/course/unreal-e...
Alright so you’re messing around in the new Unreal Engine 5, and arranging objects in your scene and you hit the Play button and you see this red warning message that says “Lighting Needs to Be Rebuilt.” So what does this mean and how do we fix it?
Well, first of all, you should understand what the word “build” means in this context. In software, the term build means to perform calculations and conversions on the code and other data in a project, in order to prepare that data to be run on a computer as an application.
So in the case of lighting, building refers to performing the calculations necessary to determine how to render light and shadows in a realistic manner. Building light requires a relatively large amount of processing power, so it’s important to build as much of it as possible before the game runs so you can save processing power while the game is running. So for moving lights and objects, that data will have to be built during run-time, but for static lights and objects, those that don’t move, the data can be built ahead of time since the processor knows what their locations will be at all times. This pre–built lighting data is sometimes referred to as the “baked-in” lighting.
Okay, so as I just mentioned, building light requires a lot of processing power and time. For small Levels, without a lot of lights and objects, these calculations might only take a few seconds, but as Levels get larger and more complex, these calculations will start to take several seconds and then possibly several minutes. And anytime an object or light is moved, the entire lighting will need to be rebuilt. So this is why the Editor has us build the lighting manually, instead of doing it automatically every single time there is a change. Even if each build only took 10 seconds, you wouldn’t want to have to wait those 10 seconds every time you moved an Actor in your Level. So this allows you to build only when you’re ready.
Alright, so when you’re ready to build, the process is quite simple. You just go up to the menu bar, go to Build, and then select Build Lighting Only. This will open and run an application in the background, called the Swarm Agent, which will process the build. You should see the progress of the build in the lower-right corner, and when it is finished, it will let you know that the build is complete.
Once the build is complete, the Lighting Needs to Be Rebuilt message will go away, and won’t come back until a change is made in the Level that requires a rebuild.