Download

Difference between SlateViewport and GameViewport

I’m learn the ue4 example ShooterGame. And i dont know what is the difference between SlateViewport and GameViewport.
And what is the purpose of the following code.

UShooterGameViewportClient* ShooterViewport = Cast<UShooterGameViewportClient>(GetGameViewportClient());
	if (FSlateApplication::IsInitialized() && ShooterViewport != nullptr)
	{
		auto SlateViewport = FSlateApplication::Get().GetGameViewport();
		auto GameViewport = ShooterViewport->GetGameViewportWidget();
		if (SlateViewport != GameViewport)
		{
			return true;
		}
	}