Ok, I tried to make it simple and figure it out what is the problem. I have an idea to just get a friend instance and return true if he’s Online. However I can’t include AdvancedFriendsLibrary.h in .h files, but in .cpp files it is possible.
I get an error: Unable to find ‘class’, ‘delegate’, ‘enum’, or ‘struct’ with name ‘FOnlineFriend’
and this warning:
Multiplayer.uproject does not list plugin ‘OnlineSubsystemSteam’ as a dependency, but module ‘Multiplayer’ depends on ‘OnlineSubsystemSteam’.
I have a simple class:
MyBlueprintFunctionLibrary.h
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "AdvancedFriendsLibrary.h" //<--- this cannot be included for some reason
#include "MyBlueprintFunctionLibrary.generated.h"
UCLASS()
class MULTIPLAYER_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Online|Presence")
static bool GetFriendPresenceStatus(const FOnlineFriend& Friend);
};
MyBlueprintFunctionLibrary.cpp
#include "MyBlueprintFunctionLibrary.h"
bool UMyBlueprintFunctionLibrary::GetFriendPresenceStatus(const FOnlineFriend& Friend)
{
const FOnlineUserPresenceStatus OnlineStatus = Friend.GetPresence().Status;
switch (OnlineStatus.State)
{
case EOnlinePresenceState::Online:
return true;
}
return false;
}
My .Build.cs file:
using UnrealBuildTool;
public class Multiplayer : ModuleRules
{
public Multiplayer(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" , "AdvancedSessions", "AdvancedSteamSessions" });
PrivateDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "OnlineSubsystemNull", "OnlineSubsystemSteam"});
}
}
.Target.cs
using UnrealBuildTool;
using System.Collections.Generic;
public class MultiplayerTarget : TargetRules
{
public MultiplayerTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V5;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_4;
bUsesSteam = true;
ExtraModuleNames.Add("Multiplayer");
}
}
I also copied OnlineSubsystemSteam into my plugins folder and rebuild an entire project.

Let me know if you need more information.
EDIT:
I changed code to use # include AdvancedFriendsLibrary.h just in .cpp file, removed warning by adding to my .uproject:
{
"Name": "OnlineSubsystemSteam",
"Enabled": true
}
But I get unknown function error:
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error: begin: stack for UAT
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error: === Critical error: ===
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error:
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error: Fatal error!
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error:
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:566][ 1]LogWindows: Error:
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff916ef123d VCRUNTIME140.dll!UnknownFunction
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff6ff3d4056 Multiplayer.exe!FString::FString()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff70718dbfc Multiplayer.exe!UMyBlueprintFunctionLibrary::GetFriendPresenceStatus() [E:\UE_5.4\Projekty\Multiplayer\Source\Multiplayer\MyBlueprintFunctionLibrary.cpp:27]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff70718add7 Multiplayer.exe!UMyBlueprintFunctionLibrary::execGetFriendPresenceStatus() [E:\UE_5.4\Projekty\Multiplayer\Intermediate\Build\Win64\UnrealGame\Inc\Multiplayer\UHT\MyBlueprintFunctionLibrary.gen.cpp:71]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff70010c8d8 Multiplayer.exe!UObject::execCallMathFunction()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff70010ee2d Multiplayer.exe!UObject::execLetBool()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000e1748 Multiplayer.exe!ProcessLocalScriptFunction()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000b8f75 Multiplayer.exe!ProcessScriptFunction<void (__cdecl*)(UObject * __ptr64,FFrame & __ptr64,void * __ptr64)>()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000e128e Multiplayer.exe!ProcessLocalFunction()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000e1748 Multiplayer.exe!ProcessLocalScriptFunction()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000e096c Multiplayer.exe!UObject::ProcessInternal()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff6ffde7669 Multiplayer.exe!UFunction::Invoke()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000df5da Multiplayer.exe!UObject::ProcessEvent()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7000b8774 Multiplayer.exe!TMulticastScriptDelegate::ProcessMulticastDelegate()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7070df7b4 Multiplayer.exe!FBlueprintGetFriendsListDelegate_DelegateWrapper() [E:\UE_5.4\Projekty\Multiplayer\Plugins\AdvancedSessions\Intermediate\Build\Win64\UnrealGame\Inc\AdvancedSessions\UHT\GetFriendsCallbackProxy.gen.cpp:68]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7070f712e Multiplayer.exe!UGetFriendsCallbackProxy::OnReadFriendsListCompleted() [E:\UE_5.4\Projekty\Multiplayer\Plugins\AdvancedSessions\Source\AdvancedSessions\Private\GetFriendsCallbackProxy.cpp:107]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7070f688b Multiplayer.exe!TBaseUObjectMethodDelegateInstance<0,UGetFriendsCallbackProxy,void __cdecl(int,bool,FString const &,FString const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [E:\UE_5.4\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:667]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff70706dcaf Multiplayer.exe!FOnlineAsyncTaskSteamReadFriendsList::TriggerDelegates() [E:\UE_5.4\Projekty\Multiplayer\Plugins\Online\OnlineSubsystemSteam\Source\Private\OnlineFriendsInterfaceSteam.cpp:336]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff706eaa8fd Multiplayer.exe!FOnlineAsyncTaskManager::GameTick()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff7070ba800 Multiplayer.exe!FOnlineSubsystemSteam::Tick() [E:\UE_5.4\Projekty\Multiplayer\Plugins\Online\OnlineSubsystemSteam\Source\Private\OnlineSubsystemSteam.cpp:378]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:568][ 1]LogWindows: Error: [Callstack] 0x00007ff6ff484185 Multiplayer.exe!TBaseRawMethodDelegateInstance<0,FTSTickerObjectBase,bool __cdecl(float),FDefaultDelegateUserPolicy>::Execute()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff6ff4ac813 Multiplayer.exe!FTSTicker::Tick()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff706dea75f Multiplayer.exe!FEngineLoop::Tick()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff706e00d0c Multiplayer.exe!GuardedMain()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff706e00dda Multiplayer.exe!GuardedMainWrapper()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff706e039a5 Multiplayer.exe!LaunchWindowsStartup()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff706e14004 Multiplayer.exe!WinMain()
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff70ae1b95a Multiplayer.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:569][ 1]LogWindows: Error: [Callstack] 0x00007ff93bca257d KERNEL32.DLL!UnknownFunction
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:570][ 1]LogWindows: Error:
LogPlayLevel: Error: UAT: [2024.05.29-00.09.57:570][ 1]LogWindows: Error: end: stack for UAT