New Slate file error

251554-sehrde.png

Hello,

I made a new slate c++ file from within ue4 and before doing that I changed the include from coreminimal to core in the project.h file and also this PrivateDependencyModuleNames.AddRange(new string[] { “Slate”, “SlateCore” }); to the build.cs file, but the slate file seems to have a lot of errors and I can’t seem to find a solution for it. Has anyone had a problem like that before? And how was it solved?

For slate APIs you need to either include Slate.h or SlateCore.h it should also include it self if you include header of your base widget header file.

In case of FArgument it is subclass (part of) of your class and it is created by Slate macros, if you didn’t decrered Slate arguments in your widget you won’t have FArguments and it is actully require you to declare them even if you wont have any, in that case just place in class decleration:

SLATE_BEGIN_ARGS(SWorldMapSlate) {}

There also possibility that IntelliSense is confused with macros, UE4 use some conventional things in C++ so sometimes it can falsly raport error, try to build anyway

@anonymous_user_f5a50610 thanks a lot for your answer! It seems like Slate,h wasn’t included in the header file, which was causing the error.