Using Slate in a Project

Setting up your project to use the Slate UI Framework

On this page

In order to use the Slate User Interface (UI) Framework, your project must be set up properly so that it is aware of the

  1. This allows you to include the Slate.h header and reference the various elements of the framework necessary for building a UI with slate.

Module Dependencies

The Slate framework is stored in a few modules. In order to make your project aware of these, some dependencies must be set up in the *.build.cs file for your project.

The modules your project needs access to are:


Dependency Type







To set up the Slate module dependencies:

  1. Open the [ProjectName].build.cs file for your project. It is located in the [ProjectDir]/[ProjectName]/Source/[ProjectName] directory.

  2. Add the InputCore public dependency by adding "InputCore" to the PublicDependencyModuleNames.

    PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

    The InputCore module is set as a public dependency by default when code projects are created.

  3. Add Slate and SlateCore private dependencies. A line exists in the *.build.cs file for adding private dependencies:

    PrivateDependencyModuleNames.AddRange(new string[] {  });

    Add the SlateCore and Slate modules to that line:

    PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

    Depending on when you created your project, and with what version of the engine, it may already have the Slate dependencies set up in the *.build.cs files but commented out. You can uncomment the appropriate lines to set up the dependencies.

    // Uncomment if you are using Slate UI
    // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback