mirror of
https://github.com/mordentral/AdvancedSessionsPlugin.git
synced 2025-10-23 08:24:18 +00:00
update session add advertisement
This commit is contained in:
@@ -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
|
// 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")
|
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);
|
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);
|
||||||
|
|
||||||
// UOnlineBlueprintCallProxyBase interface
|
// UOnlineBlueprintCallProxyBase interface
|
||||||
virtual void Activate() override;
|
virtual void Activate() override;
|
||||||
@@ -38,28 +38,30 @@ private:
|
|||||||
FDelegateHandle OnUpdateSessionCompleteDelegateHandle;
|
FDelegateHandle OnUpdateSessionCompleteDelegateHandle;
|
||||||
|
|
||||||
// Number of public connections
|
// Number of public connections
|
||||||
int NumPublicConnections;
|
int NumPublicConnections = 100;
|
||||||
|
|
||||||
// Number of private connections
|
// Number of private connections
|
||||||
int NumPrivateConnections;
|
int NumPrivateConnections = 0;
|
||||||
|
|
||||||
// Whether or not to search LAN
|
// Whether or not to search LAN
|
||||||
bool bUseLAN;
|
bool bUseLAN = false;
|
||||||
|
|
||||||
// Whether or not to allow invites
|
// Whether or not to allow invites
|
||||||
bool bAllowInvites;
|
bool bAllowInvites = true;
|
||||||
|
|
||||||
// Store extra settings
|
// Store extra settings
|
||||||
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
TArray<FSessionPropertyKeyPair> ExtraSettings;
|
||||||
|
|
||||||
// Whether to update the online data
|
// Whether to update the online data
|
||||||
bool bRefreshOnlineData;
|
bool bRefreshOnlineData = true;
|
||||||
|
|
||||||
// Allow joining in progress
|
// Allow joining in progress
|
||||||
bool bAllowJoinInProgress;
|
bool bAllowJoinInProgress = true;
|
||||||
|
|
||||||
// Update whether this is a dedicated server or not
|
// Update whether this is a dedicated server or not
|
||||||
bool bDedicatedServer;
|
bool bDedicatedServer = false;
|
||||||
|
|
||||||
|
bool bShouldAdvertise = true;
|
||||||
|
|
||||||
// The world context object in which this call is taking place
|
// The world context object in which this call is taking place
|
||||||
UObject* WorldContextObject;
|
UObject* WorldContextObject;
|
||||||
|
@@ -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)
|
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* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
UUpdateSessionCallbackProxyAdvanced* Proxy = NewObject<UUpdateSessionCallbackProxyAdvanced>();
|
||||||
Proxy->NumPublicConnections = PublicConnections;
|
Proxy->NumPublicConnections = PublicConnections;
|
||||||
@@ -24,6 +24,7 @@ UUpdateSessionCallbackProxyAdvanced* UUpdateSessionCallbackProxyAdvanced::Update
|
|||||||
Proxy->bRefreshOnlineData = bRefreshOnlineData;
|
Proxy->bRefreshOnlineData = bRefreshOnlineData;
|
||||||
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
Proxy->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||||
Proxy->bDedicatedServer = bIsDedicatedServer;
|
Proxy->bDedicatedServer = bIsDedicatedServer;
|
||||||
|
Proxy->bShouldAdvertise = bShouldAdvertise;
|
||||||
return Proxy;
|
return Proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ void UUpdateSessionCallbackProxyAdvanced::Activate()
|
|||||||
//Settings->BuildUniqueId = GetBuildUniqueId();
|
//Settings->BuildUniqueId = GetBuildUniqueId();
|
||||||
Settings->NumPublicConnections = NumPublicConnections;
|
Settings->NumPublicConnections = NumPublicConnections;
|
||||||
Settings->NumPrivateConnections = NumPrivateConnections;
|
Settings->NumPrivateConnections = NumPrivateConnections;
|
||||||
//Settings->bShouldAdvertise = true;
|
Settings->bShouldAdvertise = bShouldAdvertise;
|
||||||
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
Settings->bAllowJoinInProgress = bAllowJoinInProgress;
|
||||||
Settings->bIsLANMatch = bUseLAN;
|
Settings->bIsLANMatch = bUseLAN;
|
||||||
//Settings->bUsesPresence = true;
|
//Settings->bUsesPresence = true;
|
||||||
|
Reference in New Issue
Block a user