Cleared some todos
This commit is contained in:
parent
8917782a44
commit
6c053954c8
@ -8,12 +8,15 @@
|
|||||||
#include "GameFeaturesSubsystem.h"
|
#include "GameFeaturesSubsystem.h"
|
||||||
#include "GameFeatureAction.h"
|
#include "GameFeatureAction.h"
|
||||||
#include "GameFeaturesSubsystemSettings.h"
|
#include "GameFeaturesSubsystemSettings.h"
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "TimerManager.h"
|
#include "TimerManager.h"
|
||||||
#include "DataAssets/OLSExperienceActionSetDataAsset.h"
|
#include "DataAssets/OLSExperienceActionSetDataAsset.h"
|
||||||
#include "DataAssets/OLSExperienceDefinitionDataAsset.h"
|
#include "DataAssets/OLSExperienceDefinitionDataAsset.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
#include "Systems/OLSAssetManager.h"
|
#include "Systems/OLSAssetManager.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSExperienceManagerComponent);
|
||||||
|
|
||||||
//@TODO: Async load the experience definition itself
|
//@TODO: Async load the experience definition itself
|
||||||
//@TODO: Handle failures explicitly (go into a 'completed but failed' state rather than check()-ing)
|
//@TODO: Handle failures explicitly (go into a 'completed but failed' state rather than check()-ing)
|
||||||
//@TODO: Do the action phases at the appropriate times instead of all at once
|
//@TODO: Do the action phases at the appropriate times instead of all at once
|
||||||
@ -96,21 +99,20 @@ void UOLSExperienceManagerComponent::EndPlay(const EEndPlayReason::Type endPlayR
|
|||||||
};
|
};
|
||||||
|
|
||||||
DeactivateListOfActions(CurrentExperience->Actions);
|
DeactivateListOfActions(CurrentExperience->Actions);
|
||||||
// @Todo implement this.
|
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||||
// for (const TObjectPtr<UOLSExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
{
|
||||||
// {
|
if (actionSet != nullptr)
|
||||||
// if (ActionSet != nullptr)
|
{
|
||||||
// {
|
DeactivateListOfActions(actionSet->Actions);
|
||||||
// DeactivateListOfActions(ActionSet->Actions);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
NumExpectedPausers = context.GetNumPausers();
|
NumExpectedPausers = context.GetNumPausers();
|
||||||
|
|
||||||
if (NumExpectedPausers > 0)
|
if (NumExpectedPausers > 0)
|
||||||
{
|
{
|
||||||
// @Todo replace this with our custom.
|
OLS_LOG(LogOLSExperienceManagerComponent, Error,
|
||||||
// UE_LOG(LogLyraExperience, Error, TEXT("Actions that have asynchronous deactivation aren't fully supported yet in Lyra experiences"));
|
TEXT("Actions that have asynchronous deactivation aren't fully supported yet in Lyra experiences"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NumExpectedPausers == NumObservedPausers)
|
if (NumExpectedPausers == NumObservedPausers)
|
||||||
@ -212,10 +214,8 @@ void UOLSExperienceManagerComponent::StartExperienceLoad()
|
|||||||
check(CurrentExperience != nullptr);
|
check(CurrentExperience != nullptr);
|
||||||
check(LoadState == EOLSExperienceLoadState::Unloaded);
|
check(LoadState == EOLSExperienceLoadState::Unloaded);
|
||||||
|
|
||||||
// @Todo replace this by custom log.
|
OLS_LOG(LogOLSExperienceManagerComponent, Log, TEXT("EXPERIENCE: StartExperienceLoad(CurrentExperience = %s, %s)"),
|
||||||
// UE_LOG(LogLyraExperience, Log, TEXT("EXPERIENCE: StartExperienceLoad(CurrentExperience = %s, %s)"),
|
*CurrentExperience->GetPrimaryAssetId().ToString(), *GetClientServerContextString(this));
|
||||||
// *CurrentExperience->GetPrimaryAssetId().ToString(),
|
|
||||||
// *GetClientServerContextString(this));
|
|
||||||
|
|
||||||
LoadState = EOLSExperienceLoadState::Loading;
|
LoadState = EOLSExperienceLoadState::Loading;
|
||||||
|
|
||||||
@ -305,10 +305,9 @@ void UOLSExperienceManagerComponent::OnExperienceLoadComplete()
|
|||||||
check(LoadState == EOLSExperienceLoadState::Loading);
|
check(LoadState == EOLSExperienceLoadState::Loading);
|
||||||
check(CurrentExperience != nullptr);
|
check(CurrentExperience != nullptr);
|
||||||
|
|
||||||
// @Todo replace this by our custom.
|
OLS_LOG(LogOLSExperienceManagerComponent, Log, TEXT("EXPERIENCE: OnExperienceLoadComplete(CurrentExperience = %s, %s)"),
|
||||||
// UE_LOG(LogLyraExperience, Log, TEXT("EXPERIENCE: OnExperienceLoadComplete(CurrentExperience = %s, %s)"),
|
*CurrentExperience->GetPrimaryAssetId().ToString(),
|
||||||
// *CurrentExperience->GetPrimaryAssetId().ToString(),
|
*GetClientServerContextString(this));
|
||||||
// *GetClientServerContextString(this));
|
|
||||||
|
|
||||||
// find the URLs for our GameFeaturePlugins - filtering out dupes and ones that don't have a valid mapping
|
// find the URLs for our GameFeaturePlugins - filtering out dupes and ones that don't have a valid mapping
|
||||||
GameFeaturePluginURLs.Reset();
|
GameFeaturePluginURLs.Reset();
|
||||||
@ -328,7 +327,7 @@ void UOLSExperienceManagerComponent::OnExperienceLoadComplete()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// // Add in our extra plugin
|
// Add in our extra plugin (Lyra commented this out).
|
||||||
// if (!CurrentPlaylistData->GameFeaturePluginToActivateUntilDownloadedContentIsPresent.IsEmpty())
|
// if (!CurrentPlaylistData->GameFeaturePluginToActivateUntilDownloadedContentIsPresent.IsEmpty())
|
||||||
// {
|
// {
|
||||||
// FString PluginURL;
|
// FString PluginURL;
|
||||||
@ -340,14 +339,13 @@ void UOLSExperienceManagerComponent::OnExperienceLoadComplete()
|
|||||||
};
|
};
|
||||||
|
|
||||||
collectGameFeaturePluginURLs(CurrentExperience, CurrentExperience->GameFeaturesToEnable);
|
collectGameFeaturePluginURLs(CurrentExperience, CurrentExperience->GameFeaturesToEnable);
|
||||||
// @Todo implement this.
|
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||||
// for (const TObjectPtr<ULyraExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
{
|
||||||
// {
|
if (actionSet)
|
||||||
// if (ActionSet != nullptr)
|
{
|
||||||
// {
|
collectGameFeaturePluginURLs(actionSet, actionSet->GameFeaturesToEnable);
|
||||||
// CollectGameFeaturePluginURLs(ActionSet, ActionSet->GameFeaturesToEnable);
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// Load and activate the features
|
// Load and activate the features
|
||||||
NumGameFeaturePluginsLoading = GameFeaturePluginURLs.Num();
|
NumGameFeaturePluginsLoading = GameFeaturePluginURLs.Num();
|
||||||
@ -427,14 +425,14 @@ void UOLSExperienceManagerComponent::OnExperienceFullLoadCompleted()
|
|||||||
};
|
};
|
||||||
|
|
||||||
activateListOfActions(CurrentExperience->Actions);
|
activateListOfActions(CurrentExperience->Actions);
|
||||||
// @Todo implement this
|
|
||||||
// for (const TObjectPtr<ULyraExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||||
// {
|
{
|
||||||
// if (ActionSet != nullptr)
|
if (actionSet)
|
||||||
// {
|
{
|
||||||
// activateListOfActions(ActionSet->Actions);
|
activateListOfActions(actionSet->Actions);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
LoadState = EOLSExperienceLoadState::Loaded;
|
LoadState = EOLSExperienceLoadState::Loaded;
|
||||||
|
|
||||||
@ -449,7 +447,7 @@ void UOLSExperienceManagerComponent::OnExperienceFullLoadCompleted()
|
|||||||
|
|
||||||
// Apply any necessary scalability settings
|
// Apply any necessary scalability settings
|
||||||
#if !UE_SERVER
|
#if !UE_SERVER
|
||||||
// @Todo implement this
|
// @TODO implement UOLSSettingsLocal
|
||||||
// UOLSSettingsLocal::Get()->OnExperienceLoaded();
|
// UOLSSettingsLocal::Get()->OnExperienceLoaded();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -2,3 +2,34 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "OLSLog.h"
|
#include "OLSLog.h"
|
||||||
|
|
||||||
|
FString GetClientServerContextString(UObject* contextObject)
|
||||||
|
{
|
||||||
|
ENetRole role = ROLE_None;
|
||||||
|
|
||||||
|
if (AActor* actor = Cast<AActor>(contextObject))
|
||||||
|
{
|
||||||
|
role = actor->GetLocalRole();
|
||||||
|
}
|
||||||
|
else if (UActorComponent* component = Cast<UActorComponent>(contextObject))
|
||||||
|
{
|
||||||
|
role = component->GetOwnerRole();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (role != ROLE_None)
|
||||||
|
{
|
||||||
|
return (role == ROLE_Authority) ? TEXT("Server") : TEXT("Client");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if WITH_EDITOR
|
||||||
|
if (GIsEditor)
|
||||||
|
{
|
||||||
|
extern ENGINE_API FString GPlayInEditorContextString;
|
||||||
|
return GPlayInEditorContextString;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return TEXT("[]");
|
||||||
|
}
|
||||||
|
@ -292,6 +292,6 @@ void UOLSAssetManager::InitializeGameplayCueManager()
|
|||||||
|
|
||||||
void UOLSAssetManager::UpdateInitialGameContentLoadPercent(float gameContentPercent)
|
void UOLSAssetManager::UpdateInitialGameContentLoadPercent(float gameContentPercent)
|
||||||
{
|
{
|
||||||
// @TODO: Implement this function.
|
// Lyra left this comment.
|
||||||
// Could route this to the early startup loading screen
|
// Could route this to the early startup loading screen.
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "LoadingProcessInterface.h"
|
#include "LoadingProcessInterface.h"
|
||||||
#include "OLSExperienceManagerComponent.generated.h"
|
#include "OLSExperienceManagerComponent.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSExperienceManagerComponent, Verbose, All);
|
||||||
|
|
||||||
namespace UE::GameFeatures { struct FResult; }
|
namespace UE::GameFeatures { struct FResult; }
|
||||||
|
|
||||||
DECLARE_MULTICAST_DELEGATE_OneParam(FOLSExperienceLoadedNativeDelegate, const class UOLSExperienceDefinitionDataAsset* /*experience*/);
|
DECLARE_MULTICAST_DELEGATE_OneParam(FOLSExperienceLoadedNativeDelegate, const class UOLSExperienceDefinitionDataAsset* /*experience*/);
|
||||||
|
@ -119,4 +119,6 @@
|
|||||||
* OLS_LOG_FUNC
|
* OLS_LOG_FUNC
|
||||||
* OLS_LOG_FUNCTION_WORLD_CTX
|
* OLS_LOG_FUNCTION_WORLD_CTX
|
||||||
*/
|
*/
|
||||||
#define OLS_LOG_FUNC_NO_WORLD(categoryName, verbosity) UE_LOG(categoryName, verbosity, TEXT("[NO_WORLD][%s]"), ANSI_TO_TCHAR(__func__));
|
#define OLS_LOG_FUNC_NO_WORLD(categoryName, verbosity) UE_LOG(categoryName, verbosity, TEXT("[NO_WORLD][%s]"), ANSI_TO_TCHAR(__func__));
|
||||||
|
|
||||||
|
OLS_API FString GetClientServerContextString(UObject* contextObject = nullptr);
|
Loading…
Reference in New Issue
Block a user