Cleared some todos
This commit is contained in:
parent
8917782a44
commit
6c053954c8
@ -8,12 +8,15 @@
|
||||
#include "GameFeaturesSubsystem.h"
|
||||
#include "GameFeatureAction.h"
|
||||
#include "GameFeaturesSubsystemSettings.h"
|
||||
#include "OLSLog.h"
|
||||
#include "TimerManager.h"
|
||||
#include "DataAssets/OLSExperienceActionSetDataAsset.h"
|
||||
#include "DataAssets/OLSExperienceDefinitionDataAsset.h"
|
||||
#include "Net/UnrealNetwork.h"
|
||||
#include "Systems/OLSAssetManager.h"
|
||||
|
||||
DEFINE_LOG_CATEGORY(LogOLSExperienceManagerComponent);
|
||||
|
||||
//@TODO: Async load the experience definition itself
|
||||
//@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
|
||||
@ -96,21 +99,20 @@ void UOLSExperienceManagerComponent::EndPlay(const EEndPlayReason::Type endPlayR
|
||||
};
|
||||
|
||||
DeactivateListOfActions(CurrentExperience->Actions);
|
||||
// @Todo implement this.
|
||||
// for (const TObjectPtr<UOLSExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
||||
// {
|
||||
// if (ActionSet != nullptr)
|
||||
// {
|
||||
// DeactivateListOfActions(ActionSet->Actions);
|
||||
// }
|
||||
// }
|
||||
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||
{
|
||||
if (actionSet != nullptr)
|
||||
{
|
||||
DeactivateListOfActions(actionSet->Actions);
|
||||
}
|
||||
}
|
||||
|
||||
NumExpectedPausers = context.GetNumPausers();
|
||||
|
||||
if (NumExpectedPausers > 0)
|
||||
{
|
||||
// @Todo replace this with our custom.
|
||||
// UE_LOG(LogLyraExperience, Error, TEXT("Actions that have asynchronous deactivation aren't fully supported yet in Lyra experiences"));
|
||||
OLS_LOG(LogOLSExperienceManagerComponent, Error,
|
||||
TEXT("Actions that have asynchronous deactivation aren't fully supported yet in Lyra experiences"));
|
||||
}
|
||||
|
||||
if (NumExpectedPausers == NumObservedPausers)
|
||||
@ -212,10 +214,8 @@ void UOLSExperienceManagerComponent::StartExperienceLoad()
|
||||
check(CurrentExperience != nullptr);
|
||||
check(LoadState == EOLSExperienceLoadState::Unloaded);
|
||||
|
||||
// @Todo replace this by custom log.
|
||||
// UE_LOG(LogLyraExperience, Log, TEXT("EXPERIENCE: StartExperienceLoad(CurrentExperience = %s, %s)"),
|
||||
// *CurrentExperience->GetPrimaryAssetId().ToString(),
|
||||
// *GetClientServerContextString(this));
|
||||
OLS_LOG(LogOLSExperienceManagerComponent, Log, TEXT("EXPERIENCE: StartExperienceLoad(CurrentExperience = %s, %s)"),
|
||||
*CurrentExperience->GetPrimaryAssetId().ToString(), *GetClientServerContextString(this));
|
||||
|
||||
LoadState = EOLSExperienceLoadState::Loading;
|
||||
|
||||
@ -305,10 +305,9 @@ void UOLSExperienceManagerComponent::OnExperienceLoadComplete()
|
||||
check(LoadState == EOLSExperienceLoadState::Loading);
|
||||
check(CurrentExperience != nullptr);
|
||||
|
||||
// @Todo replace this by our custom.
|
||||
// UE_LOG(LogLyraExperience, Log, TEXT("EXPERIENCE: OnExperienceLoadComplete(CurrentExperience = %s, %s)"),
|
||||
// *CurrentExperience->GetPrimaryAssetId().ToString(),
|
||||
// *GetClientServerContextString(this));
|
||||
OLS_LOG(LogOLSExperienceManagerComponent, Log, TEXT("EXPERIENCE: OnExperienceLoadComplete(CurrentExperience = %s, %s)"),
|
||||
*CurrentExperience->GetPrimaryAssetId().ToString(),
|
||||
*GetClientServerContextString(this));
|
||||
|
||||
// find the URLs for our GameFeaturePlugins - filtering out dupes and ones that don't have a valid mapping
|
||||
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())
|
||||
// {
|
||||
// FString PluginURL;
|
||||
@ -340,14 +339,13 @@ void UOLSExperienceManagerComponent::OnExperienceLoadComplete()
|
||||
};
|
||||
|
||||
collectGameFeaturePluginURLs(CurrentExperience, CurrentExperience->GameFeaturesToEnable);
|
||||
// @Todo implement this.
|
||||
// for (const TObjectPtr<ULyraExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
||||
// {
|
||||
// if (ActionSet != nullptr)
|
||||
// {
|
||||
// CollectGameFeaturePluginURLs(ActionSet, ActionSet->GameFeaturesToEnable);
|
||||
// }
|
||||
// }
|
||||
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||
{
|
||||
if (actionSet)
|
||||
{
|
||||
collectGameFeaturePluginURLs(actionSet, actionSet->GameFeaturesToEnable);
|
||||
}
|
||||
}
|
||||
|
||||
// Load and activate the features
|
||||
NumGameFeaturePluginsLoading = GameFeaturePluginURLs.Num();
|
||||
@ -427,14 +425,14 @@ void UOLSExperienceManagerComponent::OnExperienceFullLoadCompleted()
|
||||
};
|
||||
|
||||
activateListOfActions(CurrentExperience->Actions);
|
||||
// @Todo implement this
|
||||
// for (const TObjectPtr<ULyraExperienceActionSet>& ActionSet : CurrentExperience->ActionSets)
|
||||
// {
|
||||
// if (ActionSet != nullptr)
|
||||
// {
|
||||
// activateListOfActions(ActionSet->Actions);
|
||||
// }
|
||||
// }
|
||||
|
||||
for (const TObjectPtr<UOLSExperienceActionSetDataAsset>& actionSet : CurrentExperience->ActionSets)
|
||||
{
|
||||
if (actionSet)
|
||||
{
|
||||
activateListOfActions(actionSet->Actions);
|
||||
}
|
||||
}
|
||||
|
||||
LoadState = EOLSExperienceLoadState::Loaded;
|
||||
|
||||
@ -449,7 +447,7 @@ void UOLSExperienceManagerComponent::OnExperienceFullLoadCompleted()
|
||||
|
||||
// Apply any necessary scalability settings
|
||||
#if !UE_SERVER
|
||||
// @Todo implement this
|
||||
// @TODO implement UOLSSettingsLocal
|
||||
// UOLSSettingsLocal::Get()->OnExperienceLoaded();
|
||||
#endif
|
||||
}
|
||||
|
@ -2,3 +2,34 @@
|
||||
|
||||
|
||||
#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)
|
||||
{
|
||||
// @TODO: Implement this function.
|
||||
// Could route this to the early startup loading screen
|
||||
// Lyra left this comment.
|
||||
// Could route this to the early startup loading screen.
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include "LoadingProcessInterface.h"
|
||||
#include "OLSExperienceManagerComponent.generated.h"
|
||||
|
||||
DECLARE_LOG_CATEGORY_EXTERN(LogOLSExperienceManagerComponent, Verbose, All);
|
||||
|
||||
namespace UE::GameFeatures { struct FResult; }
|
||||
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FOLSExperienceLoadedNativeDelegate, const class UOLSExperienceDefinitionDataAsset* /*experience*/);
|
||||
|
@ -119,4 +119,6 @@
|
||||
* OLS_LOG_FUNC
|
||||
* 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