Course contentsShow
← Unreal Engine Game Development
Lesson 10 of 8801. Foundations and Editor WorkflowFree lesson

Managing Engine Plugins and Third-Party Libraries

Learners will integrate external C++ libraries and engine plugins into their project structure while maintaining build stability.

In this lesson, you will learn how to expand your project’s capabilities by integrating external C++ libraries and Engine plugins while keeping your build process stable.

What are Plugins and Libraries?

Think of Plugins as modular "add-ons" for Unreal Engine—like a specialized weather system or a new file importer—that can be toggled on or off. Third-Party Libraries are external C++ code files (often .lib or .dll files) created outside of Unreal that you want to use within your game, such as a specialized math library or physics engine.

Keeping the Build Stable

Because you are now comfortable with Build.cs files, you know that the Unreal Build Tool (UBT) is responsible for compiling your project. When you add a new plugin or library, you must tell the UBT how to find them.

To add a library, you typically perform two steps in your module’s Build.cs file:

  1. Include Path: You must point the compiler to the "header files" (the .h files) so your code knows what functions are available.
  2. Library Path: You must point the linker to the actual library files so the engine knows how to execute that code when the game runs.

Here is a simplified example of how you might include a Third-Party library in your Build.cs:

// Inside your Project.Build.cs
public class MyGame : ModuleRules
{
    public MyGame(ReadOnlyTargetRules Target) : base(Target)
    {
        // Tell UBT to include the path for your library headers
        PublicIncludePaths.Add("Path/To/Your/ThirdParty/Include");
        
        // Tell UBT to link the library file
        PublicAdditionalLibraries.Add("Path/To/Your/ThirdParty/Lib/MyLibrary.lib");
    }
}

Managing Plugins

For Engine plugins, you don't usually need to modify build files manually. Instead, you navigate to Edit > Plugins in the Unreal Editor. When you enable a plugin there, the Engine automatically updates your project's configuration to include the necessary code modules.

The most important rule for stability: always restart your editor and recompile your project after adding a plugin or library. This ensures that the Unreal Header Tool and the compiler are fully synced with the new external code.

Key Takeaway: Integrating external code requires informing the Unreal Build Tool via your Build.cs file where the headers and library binaries live, ensuring the engine can successfully link them during compilation.