SlateBasics.h(6): warning: Monolithic headers should not be used by this module

Hi,
I am recompiling a tool created to convert BP to Unreal_Instance & Static Meshes for 4.25, and Im getting this error as Im compiling unreal plugin to the 5.2 version.
I have overcome a few hurdles with the code, and because I didnt write the code i barely know this person structured it but im costantly getting this error and a fail in the build.

C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Slate\Public\SlateBasics.h(6): warning: Monolithic headers should not be used by this module. Please change it to explicitly include the headers it needs.

Is there a way to specify the Slate.h so that it compiles properly?

Good evening. Until recently, I was also having trouble with SlateBasics.h(6).

In my case it was SText and GEngine and in the log, so include “Widgets/Text/STextBlock.h”
include “Engine/Engine.h”
I solved it by adding include “Engine/GameViewportClient.h”.

Take a closer look at the logs and try including any headers that seem necessary. You can find the headers to include by searching and looking at the documentation.