mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-24 08:54:16 +00:00
Compare commits
22 Commits
d9ca76cfde
...
5.5-Locked
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68ba1f51ae | ||
|
|
ca9797b112 | ||
|
|
a6f91c874c | ||
|
|
81d17ad107 | ||
|
|
24b39f20e7 | ||
|
|
2ade31aaa0 | ||
|
|
116aca3a14 | ||
|
|
f914c71e1b | ||
|
|
324193a73b | ||
|
|
af535c2f0c | ||
|
|
711cb07121 | ||
|
|
4601328395 | ||
|
|
0decc37599 | ||
|
|
579e2a1f60 | ||
|
|
7db3e9bc69 | ||
|
|
d8e3d9cbff | ||
|
|
b7275c4fda | ||
|
|
f7701e76cf | ||
|
|
e982007518 | ||
|
|
1cab9033a3 | ||
|
|
c84e58e157 | ||
|
|
817964b560 |
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"FileVersion": 3,
|
||||
"FriendlyName": "Advanced Sessions",
|
||||
"Version": 5.1,
|
||||
"VersionName": "5.1",
|
||||
"Version": 5.5,
|
||||
"VersionName": "5.5",
|
||||
"Description": "Adds new blueprint functions to handle more advanced session operations.",
|
||||
"Category": "Advanced Sessions Plugin",
|
||||
"CreatedBy": "Joshua Statzer",
|
||||
|
||||
@@ -44,6 +44,11 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = AdvancedVoiceInterface)
|
||||
bool bEnableTalkingStatusDelegate;
|
||||
|
||||
// If true we will auto travel to a game session when an invite is received.
|
||||
// This can get in the way of Beacon Sessions, you may want to disable it.
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = AdvancedFriendsInterface)
|
||||
bool bAutoTravelOnAcceptedUserInviteReceived = true;
|
||||
|
||||
//virtual void PostLoad() override;
|
||||
virtual void Shutdown() override;
|
||||
virtual void Init() override;
|
||||
@@ -52,6 +57,13 @@ public:
|
||||
FOnSessionInviteReceivedDelegate SessionInviteReceivedDelegate;
|
||||
FDelegateHandle SessionInviteReceivedDelegateHandle;
|
||||
|
||||
// custom handle to join directly from steam ui "Join Game"
|
||||
FDelegateHandle OnJoinSessionCompleteDelegateHandle;
|
||||
// custom Steam UI Join User function #Self invite#
|
||||
void OnSessionUserInviteAccepted(const bool bWasSuccessful, const int32 ControllerId, FUniqueNetIdPtr UserId, const FOnlineSessionSearchResult& InviteResult);
|
||||
// custom Steam UI function to client travel #Self invite#
|
||||
void OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result);
|
||||
|
||||
//const FUniqueNetId& /*UserId*/, const FUniqueNetId& /*FromId*/, const FString& /*AppId*/, const FOnlineSessionSearchResult& /*InviteResult*/
|
||||
void OnSessionInviteReceivedMaster(const FUniqueNetId & PersonInvited, const FUniqueNetId & PersonInviting, const FString & AppId, const FOnlineSessionSearchResult& SessionToJoin);
|
||||
|
||||
|
||||
@@ -160,6 +160,10 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|PlayerInfo|PlayerID")
|
||||
static void GetUniqueNetID(APlayerController *PlayerController, FBPUniqueNetId &UniqueNetId);
|
||||
|
||||
// Get the unique net id of a network player attached to the given controller
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|PlayerInfo|PlayerID")
|
||||
static void GetUniqueNetIdOfSessionOwner(FBlueprintSessionResult SessionResult, FBPUniqueNetId& UniqueNetId);
|
||||
|
||||
// Get the unique net id of a network player who is assigned the the given player state
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedSessions|PlayerInfo|PlayerID")
|
||||
static void GetUniqueNetIDFromPlayerState(APlayerState *PlayerState, FBPUniqueNetId &UniqueNetId);
|
||||
|
||||
@@ -23,14 +23,14 @@ class UCreateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||
* Creates a session with the default online subsystem with advanced optional inputs, for dedicated servers leave UsePresence as false and set IsDedicatedServer to true. Dedicated servers don't use presence.
|
||||
* @param PublicConnections When doing a 'listen' server, this must be >=2 (ListenServer itself counts as a connection)
|
||||
* @param bUseLAN When you want to play LAN, the level to play on must be loaded with option 'bIsLanMatch'
|
||||
* @param bUsePresence Must be true for a 'listen' server (Map must be loaded with option 'listen'), false for a 'dedicated' server.
|
||||
* @param bUseLobbiesIfAvailable Used to flag the subsystem to use a lobby api instead of general hosting if the API supports it, generally true on steam for listen servers and false for dedicated
|
||||
* Must be true for a 'listen' server (Map must be loaded with option 'listen'), false for a 'dedicated' server.
|
||||
* @param bShouldAdvertise Set to true when the OnlineSubsystem should list your server when someone is searching for servers. Otherwise the server is hidden and only join via invite is possible.
|
||||
* @param bUseLobbiesVoiceChatIfAvailable Set to true to setup voice chat lobbies if the API supports it
|
||||
* @param bStartAfterCreate Set to true to start the session after it's created. If false you need to manually call StartSession when ready.
|
||||
*/
|
||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
||||
static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair>& ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false, bool bUsePresence = true, bool bUseLobbiesIfAvailable = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true, bool bUseLobbiesVoiceChatIfAvailable = false, bool bStartAfterCreate = true);
|
||||
static UCreateSessionCallbackProxyAdvanced* CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair>& ExtraSettings, class APlayerController* PlayerController = NULL, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = true, bool bIsDedicatedServer = false, /*bool bUsePresence = true,*/ bool bUseLobbiesIfAvailable = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false, bool bAntiCheatProtected = false, bool bUsesStats = false, bool bShouldAdvertise = true, bool bUseLobbiesVoiceChatIfAvailable = false, bool bStartAfterCreate = true);
|
||||
|
||||
// UOnlineBlueprintCallProxyBase interface
|
||||
virtual void Activate() override;
|
||||
|
||||
@@ -28,7 +28,7 @@ class UFindSessionsCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||
|
||||
// Searches for advertised sessions with the default online subsystem and includes an array of filters
|
||||
UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true", WorldContext = "WorldContextObject", AutoCreateRefTerm="Filters"), Category = "Online|AdvancedSessions")
|
||||
static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, bool bSearchLobbies = true, int MinSlotsAvailable = 0);
|
||||
static UFindSessionsCallbackProxyAdvanced* FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int32 MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly = false, bool bNonEmptyServersOnly = false, bool bSecureServersOnly = false, /*bool bSearchLobbies = true,*/ int MinSlotsAvailable = 0);
|
||||
|
||||
static bool CompareVariants(const FVariantData &A, const FVariantData &B, EOnlineComparisonOpRedux Comparator);
|
||||
|
||||
@@ -99,7 +99,7 @@ private:
|
||||
bool bSecureServersOnly;
|
||||
|
||||
// Search through lobbies
|
||||
bool bSearchLobbies;
|
||||
//bool bSearchLobbies;
|
||||
|
||||
// Min slots requires to search
|
||||
int MinSlotsAvailable;
|
||||
|
||||
@@ -21,7 +21,7 @@ class UUpdateSessionCallbackProxyAdvanced : public UOnlineBlueprintCallProxyBase
|
||||
|
||||
// Creates a session with the default online subsystem with advanced optional inputs, you MUST fill in all categories or it will pass in values that you didn't want as default values
|
||||
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject",AutoCreateRefTerm="ExtraSettings"), Category = "Online|AdvancedSessions")
|
||||
static UUpdateSessionCallbackProxyAdvanced* UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = false, bool bAllowJoinInProgress = false, bool bRefreshOnlineData = true, bool bIsDedicatedServer = false, bool bShouldAdvertise = true);
|
||||
static UUpdateSessionCallbackProxyAdvanced* UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections = 100, int32 PrivateConnections = 0, bool bUseLAN = false, bool bAllowInvites = false, bool bAllowJoinInProgress = false, bool bRefreshOnlineData = true, bool bIsDedicatedServer = false, bool bShouldAdvertise = true, bool bAllowJoinViaPresence = true, bool bAllowJoinViaPresenceFriendsOnly = false);
|
||||
|
||||
// UOnlineBlueprintCallProxyBase interface
|
||||
virtual void Activate() override;
|
||||
@@ -58,6 +58,12 @@ private:
|
||||
// Allow joining in progress
|
||||
bool bAllowJoinInProgress = true;
|
||||
|
||||
// Allow joining in progress
|
||||
bool bAllowJoinViaPresence = true;
|
||||
|
||||
// Allow joining in progress
|
||||
bool bAllowJoinViaPresenceFriendsOnly = false;
|
||||
|
||||
// Update whether this is a dedicated server or not
|
||||
bool bDedicatedServer = false;
|
||||
|
||||
|
||||
@@ -20,6 +20,55 @@ UAdvancedFriendsGameInstance::UAdvancedFriendsGameInstance(const FObjectInitiali
|
||||
{
|
||||
}
|
||||
|
||||
void UAdvancedFriendsGameInstance::OnSessionUserInviteAccepted(const bool bWasSuccessful, const int32 ControllerId, FUniqueNetIdPtr UserId, const FOnlineSessionSearchResult& InviteResult)
|
||||
{
|
||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(GetWorld());
|
||||
if (SessionInterface.IsValid())
|
||||
{
|
||||
SessionInterface->ClearOnJoinSessionCompleteDelegate_Handle(OnJoinSessionCompleteDelegateHandle);
|
||||
OnJoinSessionCompleteDelegateHandle = SessionInterface->AddOnJoinSessionCompleteDelegate_Handle(
|
||||
FOnJoinSessionCompleteDelegate::CreateUObject(this, &UAdvancedFriendsGameInstance::OnJoinSessionComplete));
|
||||
|
||||
// Temp for 5.5, they aren't filling in the struct correctly
|
||||
if (!InviteResult.Session.SessionSettings.bIsDedicated)
|
||||
{
|
||||
FOnlineSessionSearchResult ModResult = InviteResult;
|
||||
ModResult.Session.SessionSettings.bUsesPresence = true;
|
||||
ModResult.Session.SessionSettings.bUseLobbiesIfAvailable = true;
|
||||
SessionInterface->JoinSession(0, NAME_GameSession, ModResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
SessionInterface->JoinSession(0, NAME_GameSession, InviteResult);
|
||||
}
|
||||
}
|
||||
UE_LOG(AdvancedFriendsInterfaceLog, Log, TEXT("Called Join Session for Steam Friends List UI InviteResults: %s, UserId: %s"), *InviteResult.GetSessionIdStr(), *UserId->ToString());
|
||||
}
|
||||
|
||||
void UAdvancedFriendsGameInstance::OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result)
|
||||
{
|
||||
|
||||
// If we don't want to auto travel to the session instance then exit out
|
||||
if (!bAutoTravelOnAcceptedUserInviteReceived)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(GetWorld());
|
||||
if (SessionInterface.IsValid())
|
||||
{
|
||||
FString ConnectInfo;
|
||||
if (SessionInterface->GetResolvedConnectString(NAME_GameSession, ConnectInfo))
|
||||
{
|
||||
APlayerController* PlayerController = GetFirstLocalPlayerController();
|
||||
if (PlayerController)
|
||||
{
|
||||
PlayerController->ClientTravel(ConnectInfo, ETravelType::TRAVEL_Absolute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UAdvancedFriendsGameInstance::Shutdown()
|
||||
{
|
||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(GetWorld());
|
||||
@@ -34,6 +83,7 @@ void UAdvancedFriendsGameInstance::Shutdown()
|
||||
// Clear all of the delegate handles here
|
||||
SessionInterface->ClearOnSessionUserInviteAcceptedDelegate_Handle(SessionInviteAcceptedDelegateHandle);
|
||||
SessionInterface->ClearOnSessionInviteReceivedDelegate_Handle(SessionInviteReceivedDelegateHandle);
|
||||
SessionInterface->ClearOnJoinSessionCompleteDelegate_Handle(OnJoinSessionCompleteDelegateHandle);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +130,9 @@ void UAdvancedFriendsGameInstance::Init()
|
||||
SessionInviteAcceptedDelegateHandle = SessionInterface->AddOnSessionUserInviteAcceptedDelegate_Handle(SessionInviteAcceptedDelegate);
|
||||
|
||||
SessionInviteReceivedDelegateHandle = SessionInterface->AddOnSessionInviteReceivedDelegate_Handle(SessionInviteReceivedDelegate);
|
||||
|
||||
// Custom steam join game delegate
|
||||
SessionInterface->OnSessionUserInviteAcceptedDelegates.AddUObject(this, &UAdvancedFriendsGameInstance::OnSessionUserInviteAccepted);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -271,6 +324,13 @@ void UAdvancedFriendsGameInstance::OnSessionInviteReceivedMaster(const FUniqueNe
|
||||
}
|
||||
}
|
||||
|
||||
// Temp for 5.5, they aren't filling in the struct correctly
|
||||
if (!BluePrintResult.OnlineResult.Session.SessionSettings.bIsDedicated)
|
||||
{
|
||||
BluePrintResult.OnlineResult.Session.SessionSettings.bUsesPresence = true;
|
||||
BluePrintResult.OnlineResult.Session.SessionSettings.bUseLobbiesIfAvailable = true;
|
||||
}
|
||||
|
||||
OnSessionInviteReceived(LocalPlayer, PInviting, AppId, BluePrintResult);
|
||||
|
||||
//IAdvancedFriendsInterface* TheInterface = NULL;
|
||||
@@ -307,6 +367,13 @@ void UAdvancedFriendsGameInstance::OnSessionInviteAcceptedMaster(const bool bWas
|
||||
FBPUniqueNetId PInvited;
|
||||
PInvited.SetUniqueNetId(PersonInvited);
|
||||
|
||||
// Temp for 5.5, they aren't filling in the struct correctly
|
||||
if (!BluePrintResult.OnlineResult.Session.SessionSettings.bIsDedicated)
|
||||
{
|
||||
BluePrintResult.OnlineResult.Session.SessionSettings.bUsesPresence = true;
|
||||
BluePrintResult.OnlineResult.Session.SessionSettings.bUseLobbiesIfAvailable = true;
|
||||
}
|
||||
|
||||
OnSessionInviteAccepted(LocalPlayer,PInvited, BluePrintResult);
|
||||
|
||||
APlayerController* Player = UGameplayStatics::GetPlayerController(GetWorld(), LocalPlayer);
|
||||
|
||||
@@ -138,7 +138,7 @@ void UAdvancedFriendsLibrary::GetFriend(APlayerController *PlayerController, con
|
||||
TSharedPtr<FOnlineFriend> fr = FriendsInterface->GetFriend(Player->GetControllerId(), *FriendUniqueNetId.GetUniqueNetId(), EFriendsLists::ToString(EFriendsLists::Default));
|
||||
if (fr.IsValid())
|
||||
{
|
||||
FOnlineUserPresence pres = fr->GetPresence();
|
||||
const FOnlineUserPresence& pres = fr->GetPresence();
|
||||
Friend.DisplayName = fr->GetDisplayName();
|
||||
Friend.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
Friend.RealName = fr->GetRealName();
|
||||
@@ -151,7 +151,8 @@ void UAdvancedFriendsLibrary::GetFriend(APlayerController *PlayerController, con
|
||||
Friend.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||
Friend.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||
Friend.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
Friend.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
// #TODO: Check back in on this in shipping, epic is missing the UTF8_TO_TCHAR call on converting this and its making an invalid string
|
||||
//Friend.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,28 +248,34 @@ void UAdvancedFriendsLibrary::GetStoredFriendsList(APlayerController *PlayerCont
|
||||
|
||||
|
||||
TArray< TSharedRef<FOnlineFriend> > FriendList;
|
||||
FriendsInterface->GetFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Default)), FriendList);
|
||||
|
||||
for (int32 i = 0; i < FriendList.Num(); i++)
|
||||
if (FriendsInterface->GetFriendsList(Player->GetControllerId(), EFriendsLists::ToString((EFriendsLists::Default)), FriendList))
|
||||
{
|
||||
TSharedRef<FOnlineFriend> Friend = FriendList[i];
|
||||
FBPFriendInfo BPF;
|
||||
FOnlineUserPresence pres = Friend->GetPresence();
|
||||
for (int32 i = 0; i < FriendList.Num(); i++)
|
||||
{
|
||||
FBPFriendInfo BPF;
|
||||
const FOnlineUserPresence& pres = FriendList[i]->GetPresence();
|
||||
|
||||
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.DisplayName = Friend->GetDisplayName();
|
||||
BPF.RealName = Friend->GetRealName();
|
||||
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
||||
BPF.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
||||
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.DisplayName = FriendList[i]->GetDisplayName();
|
||||
BPF.RealName = FriendList[i]->GetRealName();
|
||||
BPF.UniqueNetId.SetUniqueNetId(FriendList[i]->GetUserId());
|
||||
BPF.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
||||
|
||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
// #TODO: Check back in on this in shipping, epic is missing the UTF8_TO_TCHAR call on converting this and its making an invalid string
|
||||
//BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||
|
||||
FriendsList.Add(BPF);
|
||||
FriendsList.Add(BPF);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
UE_LOG(AdvancedFriendsLog, Warning, TEXT("GetFriendsList Failed to get any friends!"));
|
||||
return;
|
||||
}
|
||||
@@ -451,6 +451,17 @@ void UAdvancedSessionsLibrary::GetUniqueNetID(APlayerController *PlayerControlle
|
||||
}
|
||||
}
|
||||
|
||||
void UAdvancedSessionsLibrary::GetUniqueNetIdOfSessionOwner(FBlueprintSessionResult SessionResult, FBPUniqueNetId& UniqueNetId)
|
||||
{
|
||||
FBPUniqueNetId ReturnID;
|
||||
if (SessionResult.OnlineResult.IsValid())
|
||||
{
|
||||
ReturnID.SetUniqueNetId(SessionResult.OnlineResult.Session.OwningUserId);
|
||||
}
|
||||
|
||||
UniqueNetId = ReturnID;
|
||||
}
|
||||
|
||||
void UAdvancedSessionsLibrary::GetUniqueNetIDFromPlayerState(APlayerState *PlayerState, FBPUniqueNetId &UniqueNetId)
|
||||
{
|
||||
if (!PlayerState)
|
||||
|
||||
@@ -83,6 +83,8 @@ void UAutoLoginUserCallbackProxy::OnCompleted(int32 LocalUserNum, bool bWasSucce
|
||||
{
|
||||
OnFailure.Broadcast();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
OnFailure.Broadcast();
|
||||
|
||||
@@ -13,7 +13,7 @@ UCreateSessionCallbackProxyAdvanced::UCreateSessionCallbackProxyAdvanced(const F
|
||||
{
|
||||
}
|
||||
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair>& ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, bool bUsePresence, bool bUseLobbiesIfAvailable, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise, bool bUseLobbiesVoiceChatIfAvailable, bool bStartAfterCreate)
|
||||
UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::CreateAdvancedSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair>& ExtraSettings, class APlayerController* PlayerController, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bIsDedicatedServer, /*bool bUsePresence,*/ bool bUseLobbiesIfAvailable, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly, bool bAntiCheatProtected, bool bUsesStats, bool bShouldAdvertise, bool bUseLobbiesVoiceChatIfAvailable, bool bStartAfterCreate)
|
||||
{
|
||||
UCreateSessionCallbackProxyAdvanced* Proxy = NewObject<UCreateSessionCallbackProxyAdvanced>();
|
||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||
@@ -24,7 +24,7 @@ UCreateSessionCallbackProxyAdvanced* UCreateSessionCallbackProxyAdvanced::Create
|
||||
Proxy->bAllowInvites = bAllowInvites;
|
||||
Proxy->ExtraSettings = ExtraSettings;
|
||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||
Proxy->bUsePresence = bUsePresence;
|
||||
/*Proxy->bUsePresence = bUsePresence;*/
|
||||
Proxy->bUseLobbiesIfAvailable = bUseLobbiesIfAvailable;
|
||||
Proxy->bAllowJoinViaPresence = bAllowJoinViaPresence;
|
||||
Proxy->bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
@@ -61,13 +61,13 @@ void UCreateSessionCallbackProxyAdvanced::Activate()
|
||||
|
||||
if (bDedicatedServer)
|
||||
{
|
||||
Settings.bUsesPresence = false;
|
||||
Settings.bUseLobbiesIfAvailable = false;
|
||||
Settings.bUsesPresence = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.bUsesPresence = bUsePresence;
|
||||
Settings.bUseLobbiesIfAvailable = bUseLobbiesIfAvailable;
|
||||
Settings.bUsesPresence = bUseLobbiesIfAvailable;
|
||||
}
|
||||
|
||||
Settings.bUseLobbiesVoiceChatIfAvailable = bUseLobbiesIfAvailable ? bUseLobbiesVoiceChatIfAvailable : false;
|
||||
|
||||
@@ -102,6 +102,14 @@ void UFindFriendSessionCallbackProxy::OnFindFriendSessionCompleted(int32 LocalPl
|
||||
{
|
||||
FBlueprintSessionResult BSesh;
|
||||
BSesh.OnlineResult = Sesh;
|
||||
|
||||
// Temp for 5.5, force the values if epic isn't setting them, lobbies should always have these true
|
||||
if (!BSesh.OnlineResult.Session.SessionSettings.bIsDedicated)
|
||||
{
|
||||
BSesh.OnlineResult.Session.SessionSettings.bUseLobbiesIfAvailable = true;
|
||||
BSesh.OnlineResult.Session.SessionSettings.bUsesPresence = true;
|
||||
}
|
||||
|
||||
Result.Add(BSesh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ UFindSessionsCallbackProxyAdvanced::UFindSessionsCallbackProxyAdvanced(const FOb
|
||||
bIsOnSecondSearch = false;
|
||||
}
|
||||
|
||||
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, bool bSearchLobbies, int MinSlotsAvailable)
|
||||
UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSessionsAdvanced(UObject* WorldContextObject, class APlayerController* PlayerController, int MaxResults, bool bUseLAN, EBPServerPresenceSearchType ServerTypeToSearch, const TArray<FSessionsSearchSetting> &Filters, bool bEmptyServersOnly, bool bNonEmptyServersOnly, bool bSecureServersOnly, /*bool bSearchLobbies,*/ int MinSlotsAvailable)
|
||||
{
|
||||
UFindSessionsCallbackProxyAdvanced* Proxy = NewObject<UFindSessionsCallbackProxyAdvanced>();
|
||||
Proxy->PlayerControllerWeakPtr = PlayerController;
|
||||
@@ -28,7 +28,7 @@ UFindSessionsCallbackProxyAdvanced* UFindSessionsCallbackProxyAdvanced::FindSess
|
||||
Proxy->bEmptyServersOnly = bEmptyServersOnly,
|
||||
Proxy->bNonEmptyServersOnly = bNonEmptyServersOnly;
|
||||
Proxy->bSecureServersOnly = bSecureServersOnly;
|
||||
Proxy->bSearchLobbies = bSearchLobbies;
|
||||
//Proxy->bSearchLobbies = bSearchLobbies;
|
||||
Proxy->MinSlotsAvailable = MinSlotsAvailable;
|
||||
return Proxy;
|
||||
}
|
||||
@@ -86,7 +86,6 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
/** #define SEARCH_SWITCH_SELECTION_METHOD FName(TEXT("SWITCHSELECTIONMETHOD"))*/
|
||||
/** Whether to use lobbies vs sessions */
|
||||
/** #define SEARCH_LOBBIES FName(TEXT("LOBBYSEARCH"))*/
|
||||
|
||||
if (bEmptyServersOnly)
|
||||
tem.Set(SEARCH_EMPTY_SERVERS_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
@@ -114,9 +113,9 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
|
||||
case EBPServerPresenceSearchType::ClientServersOnly:
|
||||
{
|
||||
tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
|
||||
//tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
if (bSearchLobbies && !IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||
//if (bSearchLobbies)// && !IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||
tem.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals);
|
||||
}
|
||||
break;
|
||||
@@ -140,9 +139,9 @@ void UFindSessionsCallbackProxyAdvanced::Activate()
|
||||
|
||||
FOnlineSearchSettingsEx DedicatedOnly = tem;
|
||||
|
||||
tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
|
||||
//tem.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
if (bSearchLobbies && !IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||
//if (bSearchLobbies)// && !IOnlineSubsystem::DoesInstanceExist("STEAM"))
|
||||
tem.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals);
|
||||
|
||||
//DedicatedOnly.Set(SEARCH_DEDICATED_ONLY, true, EOnlineComparisonOp::Equals);
|
||||
@@ -225,6 +224,14 @@ void UFindSessionsCallbackProxyAdvanced::OnCompleted(bool bSuccess)
|
||||
|
||||
FBlueprintSessionResult BPResult;
|
||||
BPResult.OnlineResult = Result;
|
||||
|
||||
// Temp for 5.5, force the values if epic isn't setting them, lobbies should always have these true
|
||||
if (ServerSearchType != EBPServerPresenceSearchType::DedicatedServersOnly )
|
||||
{
|
||||
BPResult.OnlineResult.Session.SessionSettings.bUseLobbiesIfAvailable = true;
|
||||
BPResult.OnlineResult.Session.SessionSettings.bUsesPresence = true;
|
||||
}
|
||||
|
||||
SessionSearchResults.AddUnique(BPResult);
|
||||
}
|
||||
if (!bRunSecondSearch)
|
||||
|
||||
@@ -76,29 +76,31 @@ void UGetFriendsCallbackProxy::OnReadFriendsListCompleted(int32 LocalUserNum, bo
|
||||
|
||||
TArray<FBPFriendInfo> FriendsListOut;
|
||||
TArray< TSharedRef<FOnlineFriend> > FriendList;
|
||||
Friends->GetFriendsList(LocalUserNum, ListName, FriendList);
|
||||
|
||||
for (int32 i = 0; i < FriendList.Num(); i++)
|
||||
if (Friends->GetFriendsList(LocalUserNum, ListName, FriendList))
|
||||
{
|
||||
TSharedRef<FOnlineFriend> Friend = FriendList[i];
|
||||
FBPFriendInfo BPF;
|
||||
FOnlineUserPresence pres = Friend->GetPresence();
|
||||
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.DisplayName = Friend->GetDisplayName();
|
||||
BPF.RealName = Friend->GetRealName();
|
||||
BPF.UniqueNetId.SetUniqueNetId(Friend->GetUserId());
|
||||
BPF.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
||||
for (int32 i = 0; i < FriendList.Num(); i++)
|
||||
{
|
||||
FBPFriendInfo BPF;
|
||||
const FOnlineUserPresence& pres = FriendList[i]->GetPresence();
|
||||
BPF.OnlineState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.DisplayName = FriendList[i]->GetDisplayName();
|
||||
BPF.RealName = FriendList[i]->GetRealName();
|
||||
BPF.UniqueNetId.SetUniqueNetId(FriendList[i]->GetUserId());
|
||||
BPF.bIsPlayingSameGame = pres.bIsPlayingThisGame;
|
||||
|
||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||
BPF.PresenceInfo.bIsOnline = pres.bIsOnline;
|
||||
BPF.PresenceInfo.bHasVoiceSupport = pres.bHasVoiceSupport;
|
||||
BPF.PresenceInfo.bIsPlaying = pres.bIsPlaying;
|
||||
BPF.PresenceInfo.PresenceState = ((EBPOnlinePresenceState)((int32)pres.Status.State));
|
||||
|
||||
// #TODO: Check back in on this in shipping, epic is missing the UTF8_TO_TCHAR call on converting this and its making an invalid string
|
||||
//BPF.PresenceInfo.StatusString = pres.Status.StatusStr;
|
||||
BPF.PresenceInfo.bIsJoinable = pres.bIsJoinable;
|
||||
BPF.PresenceInfo.bIsPlayingThisGame = pres.bIsPlayingThisGame;
|
||||
|
||||
|
||||
FriendsListOut.Add(BPF);
|
||||
FriendsListOut.Add(BPF);
|
||||
}
|
||||
}
|
||||
|
||||
OnSuccess.Broadcast(FriendsListOut);
|
||||
|
||||
@@ -12,7 +12,7 @@ UUpdateSessionCallbackProxyAdvanced::UUpdateSessionCallbackProxyAdvanced(const F
|
||||
{
|
||||
}
|
||||
|
||||
UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bAllowJoinInProgress, bool bRefreshOnlineData, bool bIsDedicatedServer, bool bShouldAdvertise)
|
||||
UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::UpdateSession(UObject* WorldContextObject, const TArray<FSessionPropertyKeyPair> &ExtraSettings, int32 PublicConnections, int32 PrivateConnections, bool bUseLAN, bool bAllowInvites, bool bAllowJoinInProgress, bool bRefreshOnlineData, bool bIsDedicatedServer, bool bShouldAdvertise, bool bAllowJoinViaPresence, bool bAllowJoinViaPresenceFriendsOnly)
|
||||
{
|
||||
UUpdateSessionCallbackProxyAdvanced* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
||||
Proxy->NumPublicConnections = PublicConnections;
|
||||
@@ -25,6 +25,8 @@ UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::Update
|
||||
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||
Proxy->bShouldAdvertise = bShouldAdvertise;
|
||||
Proxy->bAllowJoinViaPresence = bAllowJoinViaPresence;
|
||||
Proxy->bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
return Proxy;
|
||||
}
|
||||
|
||||
@@ -65,11 +67,14 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
||||
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||
Settings->bIsLANMatch = bUseLAN;
|
||||
//Settings->bUsesPresence = true;
|
||||
//Settings->bAllowJoinViaPresence = true;
|
||||
Settings->bAllowInvites = bAllowInvites;
|
||||
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||
Settings->bIsDedicated = bDedicatedServer;
|
||||
|
||||
// Added in 5.6
|
||||
Settings->bAllowJoinViaPresence = bAllowJoinViaPresence;
|
||||
Settings->bAllowJoinViaPresenceFriendsOnly = bAllowJoinViaPresenceFriendsOnly;
|
||||
|
||||
FOnlineSessionSetting * fSetting = NULL;
|
||||
FOnlineSessionSetting ExtraSetting;
|
||||
for (int i = 0; i < ExtraSettings.Num(); i++)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"FileVersion" : 3,
|
||||
|
||||
"FriendlyName" : "Advanced Steam Sessions",
|
||||
"Version" : 5.1,
|
||||
"VersionName": "5.1",
|
||||
"Version" : 5.4,
|
||||
"VersionName": "5.4",
|
||||
"Description" : "Adds new blueprint functions to handle more advanced session operations in Steam. REQUIRES ADVANCED SESSIONS",
|
||||
"Category" : "Advanced Sessions Plugin",
|
||||
"CreatedBy" : "Joshua Statzer",
|
||||
@@ -14,7 +14,7 @@
|
||||
{
|
||||
"Name": "AdvancedSteamSessions",
|
||||
"Type": "RunTime",
|
||||
"LoadingPhase": "Default"
|
||||
"LoadingPhase": "PostDefault"
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
@@ -26,6 +26,10 @@
|
||||
"Name": "OnlineSubsystem",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "OnlineSubsystemSteam",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "OnlineSubsystemUtils",
|
||||
"Enabled": true
|
||||
|
||||
@@ -15,7 +15,8 @@ public class AdvancedSteamSessions : ModuleRules
|
||||
|
||||
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Linux) || (Target.Platform == UnrealTargetPlatform.Mac))
|
||||
{
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "SteamShared", "Steamworks"/*, "OnlineSubsystemSteam"*/ });
|
||||
PublicDependencyModuleNames.AddRange(new string[] { "SteamShared", "Steamworks", "OnlineSubsystemSteam" });
|
||||
AddEngineThirdPartyPrivateStaticDependencies(Target, "Steamworks");
|
||||
//PublicIncludePaths.AddRange(new string[] { "../Plugins/Online/OnlineSubsystemSteam/Source/Private" });// This is dumb but it isn't very open
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#pragma warning(disable:4265) // SteamAPI CCallback< specifically, this warning is off by default but 4.17 turned it on....
|
||||
#endif
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
#pragma push_macro("ARRAY_COUNT")
|
||||
#undef ARRAY_COUNT
|
||||
@@ -337,8 +337,8 @@ public:
|
||||
static bool RequestSteamFriendInfo(const FBPUniqueNetId UniqueNetId, bool bRequireNameOnly = false);
|
||||
|
||||
// Opens the steam overlay to go to the specified user dialog
|
||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI")
|
||||
static bool OpenSteamUserOverlay(const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType);
|
||||
UFUNCTION(BlueprintCallable, Category = "Online|AdvancedFriends|SteamAPI", meta = (WorldContext = "WorldContextObject"))
|
||||
static bool OpenSteamUserOverlay(UObject* WorldContextObject, const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType);
|
||||
|
||||
// Returns if the steam overlay is currently active (this can return false during initial overlay hooking)
|
||||
UFUNCTION(BlueprintPure, Category = "Online|AdvancedFriends|SteamAPI")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "Online.h"
|
||||
#include "OnlineSubsystem.h"
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
#include "steam/isteamugc.h"
|
||||
#include "steam/isteamremotestorage.h"
|
||||
#endif
|
||||
@@ -21,7 +21,7 @@
|
||||
#pragma warning(disable:4265) // SteamAPI CCallback< specifically, this warning is off by default but 4.17 turned it on....
|
||||
#endif
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
#pragma push_macro("ARRAY_COUNT")
|
||||
#undef ARRAY_COUNT
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
bTagsTruncated = false;
|
||||
}
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
FBPSteamWorkshopItemDetails(SteamUGCDetails_t &hUGCDetails)
|
||||
{
|
||||
ResultOfRequest = (FBPSteamResult)hUGCDetails.m_eResult;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "Subsystems/GameInstanceSubsystem.h"
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
#include <steam/steam_api.h>
|
||||
|
||||
@@ -38,14 +38,27 @@ public:
|
||||
void Initialize(USteamNotificationsSubsystem* MyParent)
|
||||
{
|
||||
ParentSubsystem = MyParent;
|
||||
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
OnExternalUITriggeredCallback.Register(this, &USteamNotificationsSubsystem::cSteamEventsStore::OnExternalUITriggered);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
cSteamEventsStore() :
|
||||
OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered)
|
||||
void UnInitialize(USteamNotificationsSubsystem* MyParent)
|
||||
{
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
OnExternalUITriggeredCallback.Unregister();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
cSteamEventsStore()
|
||||
{}
|
||||
//:
|
||||
/*OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered)
|
||||
{
|
||||
|
||||
}
|
||||
}*/
|
||||
#else
|
||||
//cSteamEventsStore()
|
||||
//{
|
||||
@@ -56,8 +69,9 @@ public:
|
||||
//~cSteamEventsStore(){}
|
||||
|
||||
private:
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
//STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
|
||||
STEAM_CALLBACK_MANUAL(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -72,11 +86,11 @@ public:
|
||||
/** Implement this for deinitialization of instances of the system */
|
||||
virtual void Deinitialize() override
|
||||
{
|
||||
|
||||
MyEvents.UnInitialize(this);
|
||||
}
|
||||
};
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
void USteamNotificationsSubsystem::cSteamEventsStore::OnExternalUITriggered(GameOverlayActivated_t* CallbackData)
|
||||
{
|
||||
if (ParentSubsystem)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#pragma warning(disable:4265) // SteamAPI CCallback< specifically, this warning is off by default but 4.17 turned it on....
|
||||
#endif
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
//#include "OnlineSubsystemSteam.h"
|
||||
|
||||
@@ -87,7 +87,7 @@ class USteamRequestGroupOfficersCallbackProxy : public UOnlineBlueprintCallProxy
|
||||
|
||||
private:
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
void OnRequestGroupOfficerDetails( ClanOfficerListResponse_t *pResult, bool bIOFailure);
|
||||
CCallResult<USteamRequestGroupOfficersCallbackProxy, ClanOfficerListResponse_t> m_callResultGroupOfficerRequestDetails;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#pragma warning(disable:4265) // SteamAPI CCallback< specifically, this warning is off by default but 4.17 turned it on....
|
||||
#endif
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
//#include "OnlineSubsystemSteam.h"
|
||||
|
||||
@@ -72,7 +72,7 @@ class USteamWSRequestUGCDetailsCallbackProxy : public UOnlineBlueprintCallProxyB
|
||||
|
||||
private:
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
// Internal callback when the operation completes, calls out to the public success/failure callbacks
|
||||
|
||||
void OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure);
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
#include "AdvancedSteamFriendsLibrary.h"
|
||||
#include "OnlineSubSystemHeader.h"
|
||||
#include "OnlineSubsystemTypes.h"
|
||||
#include "Engine/Texture.h"
|
||||
#include "Engine/Texture2D.h"
|
||||
#include "TextureResource.h"
|
||||
#include "PixelFormat.h"
|
||||
|
||||
//General Log
|
||||
DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
|
||||
@@ -10,7 +15,7 @@ DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
|
||||
/*int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId UniqueNetId)
|
||||
{
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!"));
|
||||
@@ -59,7 +64,7 @@ DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);
|
||||
void UAdvancedSteamFriendsLibrary::GetSteamGroups(TArray<FBPSteamGroupInfo> & SteamGroups)
|
||||
{
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
@@ -90,7 +95,7 @@ void UAdvancedSteamFriendsLibrary::GetSteamGroups(TArray<FBPSteamGroupInfo> & St
|
||||
void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId UniqueNetId, EBlueprintResultSwitch &Result/*, FString & GameName*/, int32 & AppID)
|
||||
{
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamFriendGamePlayed Had a bad UniqueNetId!"));
|
||||
@@ -132,7 +137,7 @@ void UAdvancedSteamFriendsLibrary::GetSteamFriendGamePlayed(const FBPUniqueNetId
|
||||
int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId UniqueNetId)
|
||||
{
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("IsAFriend Had a bad UniqueNetId!"));
|
||||
@@ -153,7 +158,7 @@ int32 UAdvancedSteamFriendsLibrary::GetFriendSteamLevel(const FBPUniqueNetId Uni
|
||||
FString UAdvancedSteamFriendsLibrary::GetSteamPersonaName(const FBPUniqueNetId UniqueNetId)
|
||||
{
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamPersonaName Had a bad UniqueNetId!"));
|
||||
@@ -175,7 +180,7 @@ FBPUniqueNetId UAdvancedSteamFriendsLibrary::CreateSteamIDFromString(const FStri
|
||||
{
|
||||
FBPUniqueNetId netId;
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!(SteamID64.Len() > 0))
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("CreateSteamIDFromString Had a bad UniqueNetId!"));
|
||||
@@ -200,7 +205,7 @@ FBPUniqueNetId UAdvancedSteamFriendsLibrary::GetLocalSteamIDFromSteam()
|
||||
{
|
||||
FBPUniqueNetId netId;
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
TSharedPtr<const FUniqueNetId> SteamID(new const FUniqueNetIdSteam2(SteamUser()->GetSteamID()));
|
||||
@@ -213,7 +218,7 @@ FBPUniqueNetId UAdvancedSteamFriendsLibrary::GetLocalSteamIDFromSteam()
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::RequestSteamFriendInfo(const FBPUniqueNetId UniqueNetId, bool bRequireNameOnly)
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("RequestSteamFriendInfo Had a bad UniqueNetId!"));
|
||||
@@ -233,9 +238,9 @@ bool UAdvancedSteamFriendsLibrary::RequestSteamFriendInfo(const FBPUniqueNetId U
|
||||
}
|
||||
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::OpenSteamUserOverlay(const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType)
|
||||
bool UAdvancedSteamFriendsLibrary::OpenSteamUserOverlay(UObject* WorldContextObject,const FBPUniqueNetId UniqueNetId, ESteamUserOverlayType DialogType)
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("OpenSteamUserOverlay Had a bad UniqueNetId!"));
|
||||
@@ -244,13 +249,24 @@ bool UAdvancedSteamFriendsLibrary::OpenSteamUserOverlay(const FBPUniqueNetId Uni
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
uint64 id = *((uint64*)UniqueNetId.UniqueNetId->GetBytes());
|
||||
if (DialogType == ESteamUserOverlayType::invitetolobby)
|
||||
{
|
||||
SteamFriends()->ActivateGameOverlayInviteDialog(id);
|
||||
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
|
||||
IOnlineSessionPtr SessionInterface = Online::GetSessionInterface(World);
|
||||
if (SessionInterface.IsValid())
|
||||
{
|
||||
FNamedOnlineSession* CurrentSession = SessionInterface->GetNamedSession(NAME_GameSession);
|
||||
|
||||
if (CurrentSession && CurrentSession->SessionInfo->GetSessionId().IsValid())
|
||||
{
|
||||
uint64 id = *((uint64*)CurrentSession->SessionInfo->GetSessionId().GetBytes());
|
||||
SteamFriends()->ActivateGameOverlayInviteDialog(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint64 id = *((uint64*)UniqueNetId.UniqueNetId->GetBytes());
|
||||
FString DialogName = EnumToString("ESteamUserOverlayType", (uint8)DialogType);
|
||||
SteamFriends()->ActivateGameOverlayToUser(TCHAR_TO_ANSI(*DialogName), id);
|
||||
}
|
||||
@@ -264,7 +280,7 @@ bool UAdvancedSteamFriendsLibrary::OpenSteamUserOverlay(const FBPUniqueNetId Uni
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::IsOverlayEnabled()
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
return SteamUtils()->IsOverlayEnabled();
|
||||
@@ -277,7 +293,7 @@ bool UAdvancedSteamFriendsLibrary::IsOverlayEnabled()
|
||||
|
||||
UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueNetId UniqueNetId, EBlueprintAsyncResultSwitch &Result, SteamAvatarSize AvatarSize)
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (!UniqueNetId.IsValid() || !UniqueNetId.UniqueNetId->IsValid() || UniqueNetId.UniqueNetId->GetType() != STEAM_SUBSYSTEM)
|
||||
{
|
||||
UE_LOG(AdvancedSteamFriendsLog, Warning, TEXT("GetSteamFriendAvatar Had a bad UniqueNetId!"));
|
||||
@@ -377,7 +393,7 @@ UTexture2D * UAdvancedSteamFriendsLibrary::GetSteamFriendAvatar(const FBPUniqueN
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::InitTextFiltering()
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
@@ -391,7 +407,7 @@ bool UAdvancedSteamFriendsLibrary::InitTextFiltering()
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::FilterText(FString TextToFilter, EBPTextFilteringContext Context, const FBPUniqueNetId TextSourceID, FString& FilteredText)
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
@@ -425,7 +441,7 @@ bool UAdvancedSteamFriendsLibrary::FilterText(FString TextToFilter, EBPTextFilte
|
||||
|
||||
bool UAdvancedSteamFriendsLibrary::IsSteamInBigPictureMode()
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ DEFINE_LOG_CATEGORY(AdvancedSteamWorkshopLog);
|
||||
void UAdvancedSteamWorkshopLibrary::GetNumSubscribedWorkshopItems(int32 & NumberOfItems)
|
||||
{
|
||||
NumberOfItems = 0;
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
@@ -20,10 +20,10 @@ void UAdvancedSteamWorkshopLibrary::GetNumSubscribedWorkshopItems(int32 & Number
|
||||
UE_LOG(AdvancedSteamWorkshopLog, Warning, TEXT("Error in GetNumSubscribedWorkshopItemCount : SteamAPI is not Inited!"));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
UE_LOG(AdvancedSteamWorkshopLog, Warning, TEXT("Error in GetNumSubscribedWorkshopItemCount : Called on an incompatible platform"));
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
TArray<FBPSteamWorkshopID> UAdvancedSteamWorkshopLibrary::GetSubscribedWorkshopItems(int32 & NumberOfItems)
|
||||
@@ -31,7 +31,7 @@ TArray<FBPSteamWorkshopID> UAdvancedSteamWorkshopLibrary::GetSubscribedWorkshopI
|
||||
TArray<FBPSteamWorkshopID> outArray;
|
||||
NumberOfItems = 0;
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
@@ -62,8 +62,8 @@ TArray<FBPSteamWorkshopID> UAdvancedSteamWorkshopLibrary::GetSubscribedWorkshopI
|
||||
UE_LOG(AdvancedSteamWorkshopLog, Warning, TEXT("Error in GetSubscribedWorkshopItemCount : SteamAPI is not Inited!"));
|
||||
return outArray;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
UE_LOG(AdvancedSteamWorkshopLog, Warning, TEXT("Error in GetSubscribedWorkshopItemCount : Called on an incompatible platform"));
|
||||
return outArray;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Online/CoreOnline.h"
|
||||
#include "AdvancedSteamFriendsLibrary.h"
|
||||
#include "OnlineSubSystemHeader.h"
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
#include "steam/isteamfriends.h"
|
||||
#endif
|
||||
//#include "OnlineSubsystemSteamTypes.h"
|
||||
@@ -31,7 +31,7 @@ USteamRequestGroupOfficersCallbackProxy* USteamRequestGroupOfficersCallbackProxy
|
||||
|
||||
void USteamRequestGroupOfficersCallbackProxy::Activate()
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
uint64 id = *((uint64*)GroupUniqueID.UniqueNetId->GetBytes());
|
||||
@@ -45,7 +45,7 @@ void USteamRequestGroupOfficersCallbackProxy::Activate()
|
||||
OnFailure.Broadcast(EmptyArray);
|
||||
}
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
void USteamRequestGroupOfficersCallbackProxy::OnRequestGroupOfficerDetails(ClanOfficerListResponse_t *pResult, bool bIOFailure)
|
||||
{
|
||||
TArray<FBPSteamGroupOfficer> OfficerArray;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "SteamWSRequestUGCDetailsCallbackProxy.h"
|
||||
#include "OnlineSubSystemHeader.h"
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
#include "steam/isteamugc.h"
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@ USteamWSRequestUGCDetailsCallbackProxy* USteamWSRequestUGCDetailsCallbackProxy::
|
||||
|
||||
void USteamWSRequestUGCDetailsCallbackProxy::Activate()
|
||||
{
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
if (SteamAPI_Init())
|
||||
{
|
||||
// #TODO: Support arrays instead in the future?
|
||||
@@ -49,7 +49,7 @@ void USteamWSRequestUGCDetailsCallbackProxy::Activate()
|
||||
OnFailure.Broadcast(FBPSteamWorkshopItemDetails());
|
||||
}
|
||||
|
||||
#if STEAM_SDK_INSTALLED && (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX)
|
||||
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
|
||||
void USteamWSRequestUGCDetailsCallbackProxy::OnUGCRequestUGCDetails(SteamUGCQueryCompleted_t *pResult, bool bIOFailure)
|
||||
{
|
||||
//FOnlineSubsystemSteam* SteamSubsystem = (FOnlineSubsystemSteam*)(IOnlineSubsystem::Get(STEAM_SUBSYSTEM));
|
||||
|
||||
Reference in New Issue
Block a user