You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
55 lines
2.1 KiB
Plaintext
55 lines
2.1 KiB
Plaintext
Availability:Public
|
|
Title: Using Slate in a Project
|
|
Crumbs:%ROOT%, Programming, Programming/Slate
|
|
Description:Setting up your project to use the Slate UI Framework
|
|
Version:4.4
|
|
|
|
## Overview
|
|
|
|
[EXCERPT:main]
|
|
In order to use the Slate User Interface (UI) Framework, your project must be set up properly so that it is aware of the
|
|
framework. 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:
|
|
|
|
| Module | Dependency Type |
|
|
| --------- | --------------- |
|
|
| InputCore | Public |
|
|
| Slate | Private |
|
|
| SlateCore | Private |
|
|
|
|
**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.
|
|
1. Add the InputCore public dependency by adding `"InputCore"` to the `PublicDependencyModuleNames`.
|
|
|
|
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
|
|
|
|
[REGION:note]
|
|
The InputCore module is set as a public dependency by default when code projects are created.
|
|
[/REGION]
|
|
|
|
1. Add Slate and SlateCore private dependencies. A line exists in the *.build.cs file for adding private dependencies:
|
|
|
|
PrivateDependencyModuleNames.AddRange(new string[] { });
|
|
|
|
All you need to do is add the SlateCore, and Slate modules to that line:
|
|
|
|
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
|
|
|
[REGION:tip]
|
|
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 simply uncomment the appropriate lines
|
|
to set up the dependencies!
|
|
|
|
// Uncomment if you are using Slate UI
|
|
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
|
|
|
[/REGION]
|
|
[/EXCERPT:main] |