Renamed OLSAbilitySetPrimaryDataAsset to OLSAbilitySetDataAsset.
Cleared some TODOs related to custom log.
This commit is contained in:
parent
0332ef5789
commit
7a9b1b82b2
@ -5,10 +5,12 @@
|
|||||||
|
|
||||||
#include "AbilitySystemGlobals.h"
|
#include "AbilitySystemGlobals.h"
|
||||||
#include "GameplayCueManager.h"
|
#include "GameplayCueManager.h"
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSBatchGameplayAbilityInterface.h"
|
#include "AbilitySystem/OLSBatchGameplayAbilityInterface.h"
|
||||||
#include "AbilitySystem/OLSGlobaAbilitySubsystem.h"
|
#include "AbilitySystem/OLSGlobaAbilitySubsystem.h"
|
||||||
#include "AnimInstances/OLSBaseLayerAnimInstance.h"
|
#include "AnimInstances/OLSBaseLayerAnimInstance.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSAbilitySystemComponent);
|
||||||
|
|
||||||
// Sets default values for this component's properties
|
// Sets default values for this component's properties
|
||||||
UOLSAbilitySystemComponent::UOLSAbilitySystemComponent()
|
UOLSAbilitySystemComponent::UOLSAbilitySystemComponent()
|
||||||
@ -179,10 +181,9 @@ FActiveGameplayEffectHandle UOLSAbilitySystemComponent::ApplyGameplayEffectClass
|
|||||||
if (specHandle.IsValid())
|
if (specHandle.IsValid())
|
||||||
{
|
{
|
||||||
handle = ApplyGameplayEffectSpecToSelf(*specHandle.Data.Get());
|
handle = ApplyGameplayEffectSpecToSelf(*specHandle.Data.Get());
|
||||||
|
|
||||||
//@Todo: replace this with our custom log.
|
OLS_LOG(LogOLSAbilitySystemComponent, Verbose, TEXT("[%s] Effect '%s' granted at level %f."),
|
||||||
UE_LOG(LogAbilitySystemComponent, Verbose, TEXT("[%s] Effect '%s' granted at level %f."),
|
GET_UOBJECT_NAME(GetAvatarActor()), GET_UOBJECT_NAME(effectClass), level);
|
||||||
*GetNameSafe(GetAvatarActor()), *GetNameSafe(effectClass), level);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,9 +202,8 @@ FGameplayAbilitySpecHandle UOLSAbilitySystemComponent::GiveAbilityFromClass(
|
|||||||
const FGameplayAbilitySpec newAbilitySpec(FGameplayAbilitySpec(abilityClass, level, input, GetOwner()));
|
const FGameplayAbilitySpec newAbilitySpec(FGameplayAbilitySpec(abilityClass, level, input, GetOwner()));
|
||||||
handle = GiveAbility(newAbilitySpec);
|
handle = GiveAbility(newAbilitySpec);
|
||||||
|
|
||||||
//@Todo: replace this with our custom log.
|
OLS_LOG(LogOLSAbilitySystemComponent, Log, TEXT("[%s] Ability '%s' %s at level %d."),
|
||||||
UE_LOG(LogAbilitySystemComponent, Log, TEXT("[%s] Ability '%s' %s at level %d."),
|
GET_UOBJECT_NAME(GetAvatarActor()), GET_UOBJECT_NAME(abilityClass),
|
||||||
*GetNameSafe(GetAvatarActor()), *GetNameSafe(abilityClass),
|
|
||||||
handle.IsValid() ? TEXT("successfully granted") : TEXT("failed to be granted"), level);
|
handle.IsValid() ? TEXT("successfully granted") : TEXT("failed to be granted"), level);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,8 +217,7 @@ bool UOLSAbilitySystemComponent::TryBatchActivateAbility(
|
|||||||
bool isAbilityActivated = false;
|
bool isAbilityActivated = false;
|
||||||
if (abilityHandle.IsValid())
|
if (abilityHandle.IsValid())
|
||||||
{
|
{
|
||||||
//@Todo: replace this with our custom log.
|
OLS_LOG(LogAbilitySystemComponent, Warning, TEXT("Ability handle is invalid!"));
|
||||||
// GAS_LOG(Warning, "Ability handle is invalid!");
|
|
||||||
return isAbilityActivated;
|
return isAbilityActivated;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,9 +236,8 @@ bool UOLSAbilitySystemComponent::TryBatchActivateAbility(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// @Todo: replace this with our custom log.
|
OLS_LOG(LogAbilitySystemComponent, Error,
|
||||||
// const FString Message = IsValid(Ability) ? FString::Printf(TEXT("%s does not implement Batch Gameplay Ability Interface"), *GetNameSafe(Ability)) : "is invalid";
|
TEXT("%s does not implement Batch Gameplay Ability Interface"), GET_UOBJECT_NAME(ability));
|
||||||
// GAS_LOG_ARGS(Error, "Ability %s!", *Message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
|
||||||
|
|
||||||
|
|
||||||
#include "DataAssets/OLSAbilitySetPrimaryDataAsset.h"
|
#include "DataAssets/OLSAbilitySetDataAsset.h"
|
||||||
|
|
||||||
#include "ActiveGameplayEffectHandle.h"
|
#include "ActiveGameplayEffectHandle.h"
|
||||||
#include "GameplayAbilitySpecHandle.h"
|
#include "GameplayAbilitySpecHandle.h"
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
#include "AbilitySystem/OLSAbilitySystemComponent.h"
|
||||||
#include "AbilitySystem/Abilities/OLSGameplayAbility.h"
|
#include "AbilitySystem/Abilities/OLSGameplayAbility.h"
|
||||||
#include "AbilitySystem/Attributes/OLSAttributeSetBase.h"
|
#include "AbilitySystem/Attributes/OLSAttributeSetBase.h"
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSAbilitySetDataAsset);
|
||||||
|
|
||||||
void FOLSAbilitySet_GrantedHandles::AddAbilitySpecHandle(const FGameplayAbilitySpecHandle& handle)
|
void FOLSAbilitySet_GrantedHandles::AddAbilitySpecHandle(const FGameplayAbilitySpecHandle& handle)
|
||||||
{
|
{
|
||||||
if (handle.IsValid())
|
if (handle.IsValid())
|
||||||
@ -66,11 +69,11 @@ void FOLSAbilitySet_GrantedHandles::TakeFromAbilitySystem(UOLSAbilitySystemCompo
|
|||||||
GrantedAttributeSets.Reset();
|
GrantedAttributeSets.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
UOLSAbilitySetPrimaryDataAsset::UOLSAbilitySetPrimaryDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
UOLSAbilitySetDataAsset::UOLSAbilitySetDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void UOLSAbilitySetPrimaryDataAsset::GiveToAbilitySystem(
|
void UOLSAbilitySetDataAsset::GiveToAbilitySystem(
|
||||||
UOLSAbilitySystemComponent* olsASC,
|
UOLSAbilitySystemComponent* olsASC,
|
||||||
FOLSAbilitySet_GrantedHandles* outGrantedHandlePtrs,
|
FOLSAbilitySet_GrantedHandles* outGrantedHandlePtrs,
|
||||||
UObject* sourceObject) const
|
UObject* sourceObject) const
|
||||||
@ -90,11 +93,11 @@ void UOLSAbilitySetPrimaryDataAsset::GiveToAbilitySystem(
|
|||||||
|
|
||||||
if (!IsValid(setToGrant.AttributeSet))
|
if (!IsValid(setToGrant.AttributeSet))
|
||||||
{
|
{
|
||||||
//@Todo: Replace this with custom log.
|
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedAttributes[%d] on ability set [%s] is not valid"),
|
||||||
// UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedAttributes[%d] on ability set [%s] is not valid"), SetIndex, *GetNameSafe(this));
|
setIndex, GET_UOBJECT_NAME(this));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
UAttributeSet* newSet = NewObject<UAttributeSet>(olsASC->GetOwner(), setToGrant.AttributeSet);
|
UAttributeSet* newSet = NewObject<UAttributeSet>(olsASC->GetOwner(), setToGrant.AttributeSet);
|
||||||
olsASC->AddAttributeSetSubobject(newSet);
|
olsASC->AddAttributeSetSubobject(newSet);
|
||||||
|
|
||||||
@ -111,8 +114,8 @@ void UOLSAbilitySetPrimaryDataAsset::GiveToAbilitySystem(
|
|||||||
|
|
||||||
if (!IsValid(AbilityToGrant.Ability))
|
if (!IsValid(AbilityToGrant.Ability))
|
||||||
{
|
{
|
||||||
//@Todo: Replace this with custom log.
|
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedGameplayAbilities[%d] on ability set [%s] is not valid"),
|
||||||
// UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedGameplayAbilities[%d] on ability set [%s] is not valid."), AbilityIndex, *GetNameSafe(this));
|
abilityIndex, GET_UOBJECT_NAME(this));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,8 +140,8 @@ void UOLSAbilitySetPrimaryDataAsset::GiveToAbilitySystem(
|
|||||||
|
|
||||||
if (!IsValid(EffectToGrant.GameplayEffect))
|
if (!IsValid(EffectToGrant.GameplayEffect))
|
||||||
{
|
{
|
||||||
//@Todo: Replace this with custom log.
|
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedGameplayEffects[%d] on ability set [%s] is not valid"),
|
||||||
// UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedGameplayEffects[%d] on ability set [%s] is not valid"), EffectIndex, *GetNameSafe(this));
|
effectIndex, GET_UOBJECT_NAME(this));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
#include "AbilitySystem/Attributes/OLSCombatAttributeSet.h"
|
#include "AbilitySystem/Attributes/OLSCombatAttributeSet.h"
|
||||||
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
#include "AbilitySystem/Attributes/OLSHealthAttributeSet.h"
|
||||||
#include "Components/GameFrameworkComponentManager.h"
|
#include "Components/GameFrameworkComponentManager.h"
|
||||||
#include "DataAssets/OLSAbilitySetPrimaryDataAsset.h"
|
#include "DataAssets/OLSAbilitySetDataAsset.h"
|
||||||
#include "GameModes/OLSExperienceManagerComponent.h"
|
#include "GameModes/OLSExperienceManagerComponent.h"
|
||||||
#include "GameModes/OLSGameMode.h"
|
#include "GameModes/OLSGameMode.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
@ -51,7 +51,7 @@ void AOLSPlayerState::SetPawnData(const UOLSPawnDataAsset* pawnData)
|
|||||||
|
|
||||||
MARK_PROPERTY_DIRTY_FROM_NAME(ThisClass, PawnData, this);
|
MARK_PROPERTY_DIRTY_FROM_NAME(ThisClass, PawnData, this);
|
||||||
|
|
||||||
for (const UOLSAbilitySetPrimaryDataAsset* abilityDataAsset : PawnData->AbilitySets)
|
for (const UOLSAbilitySetDataAsset* abilityDataAsset : PawnData->AbilitySets)
|
||||||
{
|
{
|
||||||
if (abilityDataAsset)
|
if (abilityDataAsset)
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "Systems/OLSAssetManager.h"
|
#include "Systems/OLSAssetManager.h"
|
||||||
|
|
||||||
|
#include "OLSLog.h"
|
||||||
#include "DataAssets/OLSGameDataAsset.h"
|
#include "DataAssets/OLSGameDataAsset.h"
|
||||||
#include "Misc/App.h"
|
#include "Misc/App.h"
|
||||||
#include "Stats/StatsMisc.h"
|
#include "Stats/StatsMisc.h"
|
||||||
@ -13,6 +14,8 @@
|
|||||||
|
|
||||||
#include UE_INLINE_GENERATED_CPP_BY_NAME(OLSAssetManager)
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(OLSAssetManager)
|
||||||
|
|
||||||
|
DEFINE_LOG_CATEGORY(LogOLSAssetManager);
|
||||||
|
|
||||||
const FName FOLSBundles::Equipped("Equipped");
|
const FName FOLSBundles::Equipped("Equipped");
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
@ -44,8 +47,7 @@ UOLSAssetManager& UOLSAssetManager::Get()
|
|||||||
return *Singleton;
|
return *Singleton;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Todo replace this our custom log.
|
OLS_LOG_NO_WORLD(LogOLSAssetManager, Fatal, TEXT("Invalid AssetManagerClassName in DefaultEngine.ini. It must be set to LyraAssetManager!"));
|
||||||
// UE_LOG(LogLyra, Fatal, TEXT("Invalid AssetManagerClassName in DefaultEngine.ini. It must be set to LyraAssetManager!"));
|
|
||||||
|
|
||||||
// Fatal error above prevents this from being called.
|
// Fatal error above prevents this from being called.
|
||||||
return *NewObject<UOLSAssetManager>();
|
return *NewObject<UOLSAssetManager>();
|
||||||
@ -53,6 +55,15 @@ UOLSAssetManager& UOLSAssetManager::Get()
|
|||||||
|
|
||||||
void UOLSAssetManager::DumpLoadedAssets()
|
void UOLSAssetManager::DumpLoadedAssets()
|
||||||
{
|
{
|
||||||
|
OLS_LOG_NO_WORLD(LogOLSAssetManager, Log, TEXT("========== Start Dumping Loaded Assets =========="));
|
||||||
|
|
||||||
|
for (const UObject* loadedAsset : Get().LoadedAssets)
|
||||||
|
{
|
||||||
|
OLS_LOG_NO_WORLD(LogOLSAssetManager, Log, TEXT(" %s"), GET_UOBJECT_NAME(loadedAsset));
|
||||||
|
}
|
||||||
|
|
||||||
|
OLS_LOG_NO_WORLD(LogOLSAssetManager, Log, TEXT("... %d assets in loaded pool"), Get().LoadedAssets.Num());
|
||||||
|
OLS_LOG_NO_WORLD(LogOLSAssetManager, Log, TEXT("========== Finish Dumping Loaded Assets =========="));
|
||||||
}
|
}
|
||||||
|
|
||||||
const UOLSGameDataAsset& UOLSAssetManager::GetGameData()
|
const UOLSGameDataAsset& UOLSAssetManager::GetGameData()
|
||||||
@ -129,8 +140,7 @@ void UOLSAssetManager::StartInitialLoading()
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Load base game data asset
|
// Load base game data asset
|
||||||
// @Todo uncomment this after implementing GetGameData().
|
STARTUP_JOB_WEIGHTED(GetGameData(), 25.f);
|
||||||
// STARTUP_JOB_WEIGHTED(GetGameData(), 25.f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run all the queued up startup jobs
|
// Run all the queued up startup jobs
|
||||||
@ -148,8 +158,7 @@ void UOLSAssetManager::PreBeginPIE(bool shouldStartSimulate)
|
|||||||
const bool shouldAllowInPIE = true;
|
const bool shouldAllowInPIE = true;
|
||||||
slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE);
|
slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE);
|
||||||
|
|
||||||
// @Todo unlock this comment.
|
const UOLSGameDataAsset& LocalGameDataCommon = GetGameData();
|
||||||
// const ULyraGameData& LocalGameDataCommon = GetGameData();
|
|
||||||
|
|
||||||
// Intentionally after GetGameData to avoid counting GameData time in this timer
|
// Intentionally after GetGameData to avoid counting GameData time in this timer
|
||||||
SCOPE_LOG_TIME_IN_SECONDS(TEXT("PreBeginPIE asset preloading complete"), nullptr);
|
SCOPE_LOG_TIME_IN_SECONDS(TEXT("PreBeginPIE asset preloading complete"), nullptr);
|
||||||
@ -176,8 +185,8 @@ UPrimaryDataAsset* UOLSAssetManager::LoadGameDataOfClass(
|
|||||||
const bool shouldAllowInPIE = true;
|
const bool shouldAllowInPIE = true;
|
||||||
slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE);
|
slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE);
|
||||||
#endif
|
#endif
|
||||||
// @Todo replace this log with our custom.
|
|
||||||
// UE_LOG(LogLyra, Log, TEXT("Loading GameData: %s ..."), *dataClassPath.ToString());
|
OLS_LOG(LogOLSAssetManager, Log, TEXT("Loading GameData: %%s ..."), *dataClassPath.ToString());
|
||||||
SCOPE_LOG_TIME_IN_SECONDS(TEXT(" ... GameData loaded!"), nullptr);
|
SCOPE_LOG_TIME_IN_SECONDS(TEXT(" ... GameData loaded!"), nullptr);
|
||||||
|
|
||||||
// This can be called recursively in the editor because it is called on demand from PostLoad so force a sync load for primary asset and async load the rest in that case
|
// This can be called recursively in the editor because it is called on demand from PostLoad so force a sync load for primary asset and async load the rest in that case
|
||||||
@ -206,8 +215,10 @@ UPrimaryDataAsset* UOLSAssetManager::LoadGameDataOfClass(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It is not acceptable to fail to load any GameData asset. It will result in soft failures that are hard to diagnose.
|
// It is not acceptable to fail to load any GameData asset. It will result in soft failures that are hard to diagnose.
|
||||||
// @Todo replace this log with our custom.
|
OLS_LOG(LogOLSAssetManager, Fatal,
|
||||||
// UE_LOG(LogLyra, Fatal, TEXT("Failed to load GameData asset at %s. Type %s. This is not recoverable and likely means you do not have the correct data to run %s."), *dataClassPath.ToString(), *primaryAssetType.ToString(), FApp::GetProjectName());
|
TEXT(
|
||||||
|
"Failed to load GameData asset at %s. Type %s. This is not recoverable and likely means you do not have the correct data to run %s."
|
||||||
|
), *dataClassPath.ToString(), *primaryAssetType.ToString(), FApp::GetProjectName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return asset;
|
return asset;
|
||||||
@ -215,64 +226,65 @@ UPrimaryDataAsset* UOLSAssetManager::LoadGameDataOfClass(
|
|||||||
|
|
||||||
void UOLSAssetManager::DoAllStartupJobs()
|
void UOLSAssetManager::DoAllStartupJobs()
|
||||||
{
|
{
|
||||||
SCOPED_BOOT_TIMING("ULyraAssetManager::DoAllStartupJobs");
|
SCOPED_BOOT_TIMING("UOLSAssetManager::DoAllStartupJobs");
|
||||||
const double AllStartupJobsStartTime = FPlatformTime::Seconds();
|
const double allStartupJobsStartTime = FPlatformTime::Seconds();
|
||||||
|
|
||||||
// if (IsRunningDedicatedServer())
|
if (IsRunningDedicatedServer())
|
||||||
// {
|
{
|
||||||
// // No need for periodic progress updates, just run the jobs
|
// No need for periodic progress updates, just run the jobs
|
||||||
// for (const FLyraAssetManagerStartupJob& StartupJob : StartupJobs)
|
for (const FOLSAssetManagerStartupJob& startupJob : StartupJobs)
|
||||||
// {
|
{
|
||||||
// StartupJob.DoJob();
|
startupJob.DoJob();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// if (StartupJobs.Num() > 0)
|
if (StartupJobs.Num() > 0)
|
||||||
// {
|
{
|
||||||
// float TotalJobValue = 0.0f;
|
float totalJobValue = 0.0f;
|
||||||
// for (const FLyraAssetManagerStartupJob& StartupJob : StartupJobs)
|
for (const FOLSAssetManagerStartupJob& startupJob : StartupJobs)
|
||||||
// {
|
{
|
||||||
// TotalJobValue += StartupJob.JobWeight;
|
totalJobValue += startupJob.JobWeight;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// float AccumulatedJobValue = 0.0f;
|
float accumulatedJobValue = 0.0f;
|
||||||
// for (FLyraAssetManagerStartupJob& StartupJob : StartupJobs)
|
for (FOLSAssetManagerStartupJob& startupJob : StartupJobs)
|
||||||
// {
|
{
|
||||||
// const float JobValue = StartupJob.JobWeight;
|
const float jobValue = startupJob.JobWeight;
|
||||||
// StartupJob.SubstepProgressDelegate.BindLambda([This = this, AccumulatedJobValue, JobValue, TotalJobValue](float NewProgress)
|
startupJob.SubstepProgressDelegate.BindLambda([This = this, accumulatedJobValue, jobValue, totalJobValue](float NewProgress)
|
||||||
// {
|
{
|
||||||
// const float SubstepAdjustment = FMath::Clamp(NewProgress, 0.0f, 1.0f) * JobValue;
|
const float SubstepAdjustment = FMath::Clamp(NewProgress, 0.0f, 1.0f) * jobValue;
|
||||||
// const float OverallPercentWithSubstep = (AccumulatedJobValue + SubstepAdjustment) / TotalJobValue;
|
const float OverallPercentWithSubstep = (accumulatedJobValue + SubstepAdjustment) / totalJobValue;
|
||||||
//
|
|
||||||
// This->UpdateInitialGameContentLoadPercent(OverallPercentWithSubstep);
|
This->UpdateInitialGameContentLoadPercent(OverallPercentWithSubstep);
|
||||||
// });
|
});
|
||||||
//
|
|
||||||
// StartupJob.DoJob();
|
startupJob.DoJob();
|
||||||
//
|
|
||||||
// StartupJob.SubstepProgressDelegate.Unbind();
|
startupJob.SubstepProgressDelegate.Unbind();
|
||||||
//
|
|
||||||
// AccumulatedJobValue += JobValue;
|
accumulatedJobValue += jobValue;
|
||||||
//
|
|
||||||
// UpdateInitialGameContentLoadPercent(AccumulatedJobValue / TotalJobValue);
|
UpdateInitialGameContentLoadPercent(accumulatedJobValue / totalJobValue);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// UpdateInitialGameContentLoadPercent(1.0f);
|
UpdateInitialGameContentLoadPercent(1.0f);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// StartupJobs.Empty();
|
StartupJobs.Empty();
|
||||||
|
|
||||||
// @Todo replace this with our custom log.
|
OLS_LOG(LogOLSAssetManager, Display, TEXT("All startup jobs took %.2f seconds to complete"),
|
||||||
// UE_LOG(LogLyra, Display, TEXT("All startup jobs took %.2f seconds to complete"), FPlatformTime::Seconds() - AllStartupJobsStartTime);
|
FPlatformTime::Seconds() - allStartupJobsStartTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UOLSAssetManager::InitializeGameplayCueManager()
|
void UOLSAssetManager::InitializeGameplayCueManager()
|
||||||
{
|
{
|
||||||
SCOPED_BOOT_TIMING("UOLSAssetManager::InitializeGameplayCueManager");
|
SCOPED_BOOT_TIMING("UOLSAssetManager::InitializeGameplayCueManager");
|
||||||
|
|
||||||
|
// @TODO: Implement this after implementing ULyraGameplayCueManager.
|
||||||
// ULyraGameplayCueManager* GCM = ULyraGameplayCueManager::Get();
|
// ULyraGameplayCueManager* GCM = ULyraGameplayCueManager::Get();
|
||||||
// check(GCM);
|
// check(GCM);
|
||||||
// GCM->LoadAlwaysLoadedCues();
|
// GCM->LoadAlwaysLoadedCues();
|
||||||
@ -280,5 +292,6 @@ void UOLSAssetManager::InitializeGameplayCueManager()
|
|||||||
|
|
||||||
void UOLSAssetManager::UpdateInitialGameContentLoadPercent(float gameContentPercent)
|
void UOLSAssetManager::UpdateInitialGameContentLoadPercent(float gameContentPercent)
|
||||||
{
|
{
|
||||||
|
// @TODO: Implement this function.
|
||||||
// Could route this to the early startup loading screen
|
// Could route this to the early startup loading screen
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include "AbilitySystemComponent.h"
|
#include "AbilitySystemComponent.h"
|
||||||
#include "OLSAbilitySystemComponent.generated.h"
|
#include "OLSAbilitySystemComponent.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSAbilitySystemComponent, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CVAR to control the "Play Montage" flow.
|
* CVAR to control the "Play Montage" flow.
|
||||||
* Example: OLS.EnableDefaultPlayMontage true
|
* Example: OLS.EnableDefaultPlayMontage true
|
||||||
|
@ -5,7 +5,10 @@
|
|||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "GameplayTagContainer.h"
|
#include "GameplayTagContainer.h"
|
||||||
#include "OLSPawnDataAsset.h"
|
#include "OLSPawnDataAsset.h"
|
||||||
#include "OLSAbilitySetPrimaryDataAsset.generated.h"
|
#include "OLSAbilitySetDataAsset.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSAbilitySetDataAsset, Verbose, All);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FOLSAbilitySet_GameplayAbility
|
* FOLSAbilitySet_GameplayAbility
|
||||||
*
|
*
|
||||||
@ -102,15 +105,20 @@ protected:
|
|||||||
TArray<TObjectPtr<class UAttributeSet>> GrantedAttributeSets;
|
TArray<TObjectPtr<class UAttributeSet>> GrantedAttributeSets;
|
||||||
};
|
};
|
||||||
|
|
||||||
UCLASS()
|
/**
|
||||||
class OLS_API UOLSAbilitySetPrimaryDataAsset : public UOLSPawnDataAsset
|
* UOLSAbilitySetDataAsset
|
||||||
|
*
|
||||||
|
* Non-mutable data asset used to grant gameplay abilities and gameplay effects.
|
||||||
|
*/
|
||||||
|
UCLASS(BlueprintType, Const)
|
||||||
|
class OLS_API UOLSAbilitySetDataAsset : public UOLSPawnDataAsset
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UOLSAbilitySetPrimaryDataAsset(const FObjectInitializer& objectInitializer);
|
UOLSAbilitySetDataAsset(const FObjectInitializer& objectInitializer);
|
||||||
|
|
||||||
// Grants the ability set to the specified ability system component.
|
// Grants the ability set to the specified ability system component.
|
||||||
// The returned handles can be used later to take away anything that was granted.
|
// The returned handles can be used later to take away anything that was granted.
|
@ -33,7 +33,7 @@ public:
|
|||||||
|
|
||||||
// Ability sets to grant to this pawn's ability system.
|
// Ability sets to grant to this pawn's ability system.
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "OLS|Abilities")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "OLS|Abilities")
|
||||||
TArray<TObjectPtr<class UOLSAbilitySetPrimaryDataAsset>> AbilitySets;
|
TArray<TObjectPtr<class UOLSAbilitySetDataAsset>> AbilitySets;
|
||||||
|
|
||||||
// What mapping of ability tags to use for actions taking by this pawn
|
// What mapping of ability tags to use for actions taking by this pawn
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "OLS|Abilities")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "OLS|Abilities")
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
*/
|
*/
|
||||||
#define GET_UOBJECT_NAME(obj) obj ? *obj->GetName() : TEXT("NULL")
|
#define GET_UOBJECT_NAME(obj) obj ? *obj->GetName() : TEXT("NULL")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper Macro which returns the string from GetNameSafe on the UObject it's passed
|
||||||
|
* (Returns NULL if the pointer is null)
|
||||||
|
*/
|
||||||
|
#define GET_UOBJECT_NAME_SAFE(obj) obj ? *obj->GetNameSafe() : TEXT("NULL")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper Macro which returns the string from GetFullName on the UObject it's passed
|
* Helper Macro which returns the string from GetFullName on the UObject it's passed
|
||||||
* (Returns NULL if the pointer is null)
|
* (Returns NULL if the pointer is null)
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "Engine/AssetManager.h"
|
#include "Engine/AssetManager.h"
|
||||||
#include "OLSAssetManager.generated.h"
|
#include "OLSAssetManager.generated.h"
|
||||||
|
|
||||||
|
DECLARE_LOG_CATEGORY_EXTERN(LogOLSAssetManager, Verbose, All);
|
||||||
|
|
||||||
struct FOLSBundles
|
struct FOLSBundles
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user