Issues with Set Up and Compile Your Project

Hello,

I’m new to Unreal Engine 5 (even though I have some experience in programming in general and c++ in particular)
I’ve started following the tutorial: “Set Up and Compile Your Project” (Set Up and Compile a C++ Project in Unreal Engine | Unreal Engine 5.6 Documentation | Epic Developer Community) and I’m encountering a strange problem. Indeed, after creating the AdventureGameMode class, I try to compile the project and I get lots of compilation errors. As example :

incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<bool>" is not allowed
function "UEditorEngine::GetPlaySessionRequest" returns incomplete type "const TOptional<FRequestPlaySessionParams>"
function "UEditorEngine::GetPlayInEditorSessionInfo" returns incomplete type "const TOptional<FPlayInEditorSessionInfo>"
incomplete type "TOptional<UEditorEngine::FLauncherCachedInfo>" is not allowed
incomplete type "TOptional<FRequestPlaySessionParams>" is not allowed
incomplete type "TOptional<FPlayInEditorSessionInfo>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<FCppClassTypeInfo>" is not allowed
incomplete type "TOptional<EMouseCursor::Type>" is not allowed
incomplete type "TOptional<FRegexPattern>" is not allowed
incomplete type "TOptional<FString>" is not allowed
incomplete type "TOptional<FString>" is not allowed
incomplete type "TOr<TAndValue<<error-constant>, TIsPODType<TOptional<FString>>>, TIsArithmetic<TOptional<FString>>>" is not allowed
incomplete type "TOptional<FString>" is not allowed
incomplete type "TOptional<EAnimInterpolationType>" is not allowed
incomplete type "TOptional<EAspectRatioAxisConstraint>" is not allowed
incomplete type "TOptional<FTransform>" (aka "TOptional<UE::Math::TTransform<double>>") is not allowed
incomplete type "TOptional<FBodyInstance::FAsyncTermBodyPayload>" is not allowed
incomplete type "TOptional<FLinearColor>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<ENetLevelVisibilityRequest>" is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<TCircularBuffer<TUniquePtr<FBitReader, TDefaultDelete<FBitReader>>>>" is not allowed
incomplete type "TOptional<FNetworkCongestionControl>" is not allowed
incomplete type "TOptional<FBoxSphereBounds>" (aka "TOptional<UE::Math::TBoxSphereBounds<double, double>>") is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<const UE::FTimeout>" is not allowed
incomplete type "TOptional<const UE::FTimeout>" is not allowed
incomplete type "TOptional<const UE::FTimeout>" is not allowed
incomplete type "TOptional<FMaterialLayersFunctions::ID>" (aka "TOptional<FMaterialLayersFunctionsID>") is not allowed
incomplete type "TOptional<FMaterialCachedTexturesSamplingInfo>" is not allowed
incomplete type "TOptional<FStaticParameterSet>" is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<FCsvDeclaredStat>" is not allowed
incomplete type "TOptional<FRHIBreadcrumbNode *>" is not allowed
incomplete type "TOptional<const FRHIDrawStatsCategory *>" is not allowed
incomplete type "TOptional<const FRHIDrawStatsCategory *>" is not allowed
incomplete type "TOptional<ENamedThreads::Type>" is not allowed
incomplete type "TOptional<int64>" (aka "TOptional<signed long long>") is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<ETextureDimension>" is not allowed
incomplete type "TOptional<ETextureDimension>" is not allowed
incomplete type "TOptional<FSlateClippingState>" is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<FIntPoint>" (aka "TOptional<UE::Math::TIntPoint<signed int>>") is not allowed
incomplete type "TOptional<EHorizontalAlignment>" is not allowed
incomplete type "TOptional<EVerticalAlignment>" is not allowed
incomplete type "TOptional<FSizeParam>" is not allowed
incomplete type "TOptional<TSharedRef<SWidget, ESPMode::ThreadSafe>>" is not allowed
incomplete type "TOptional<TSharedRef<const SWidget, ESPMode::ThreadSafe>>" is not allowed
incomplete type "SlateAttributePrivate::TSlateAttributeBase<SWidget, TOptional<FSlateRenderTransform>, std::conditional<true, SlateAttributePrivate::FSlateAttributeNoInvalidationReason, TSlateAttributeInvalidationReason<EInvalidateWidgetReason::None>>::type, TSlateAttributeComparePredicate<TEqualTo<void>>, SlateAttributePrivate::ESlateAttributeType::Member>::ObjectType" (aka "TOptional<TTransform2<float>>") is not allowed
incomplete type "TOptional<FAccessibleWidgetData>" is not allowed
incomplete type "TOptional<int32>" (aka "TOptional<signed int>") is not allowed
incomplete type "TOptional<float>" is not allowed
incomplete type "TOptional<FText>" is not allowed
incomplete type "TOptional<bool>" is not allowed
incomplete type "TOptional<EPopupMethod>" is not allowed
incomplete type "TOptional<EPopupMethod>" is not allowed
incomplete type "TOptional<EPopupMethod>" is not allowed
incomplete type "TOptional<double>" is not allowed
incomplete type "TOptional<FString>" is not allowed

I’m not sure I understand why VS is sending me all these errors. I mean, since I haven’t really started implementing anything yet, it seems odd. Do you have any clues as to what I’m doing wrong?

Thanks!!

2 Likes

Solved the problem yet ? I have the same problem here , Can’t find a solution on any website nether with the help of chatGPT .

Conseguiram arrumar?

estou tentando de tudo e não consigo.

This log from IntelliSence and has nothing with the real reason compilation error.

Can you share the code itself along with the include statements? My guess is that you haven’t included a required file — probably FRequestPlaySessionParams.