Cannot declare FSlateBrush variable in custom C++ class

You need to go to your Build.cs file, which is stored in Source folder, and uncomment or add this line:

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

3 Likes