My header EOSSessionStructs.h is this
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "OnlineSessionSettings.h"
#include "EOSSessionStructs.generated.h"
USTRUCT(BlueprintType)
struct FJoinableSessionResult
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "EOS Sessions")
FOnlineSessionSearchResult SessionResult; // <----- this line gives the error
UPROPERTY()
UObject* SafeObjectPointer;
};
and it gives the error
error : Unrecognized type 'FOnlineSessionSearchResult' - type must be a UCLASS, USTRUCT, UENUM, or global delegate.
and my Build.cs file is
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubsystem", "OnlineSubsystemEOS" });
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem" });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
PrivateDependencyModuleNames.Add("OnlineSubsystem");
I read other topics similar to this about manually including the header #include “OnlineSessionSettings.h”, but I’m not entirely sure how to get mine to work.
Please help