Compare commits

..

No commits in common. "8917782a44149ed9398ecc20757d9311be2da3c7" and "0332ef5789d18964d71f5ef402946e02f1f5a901" have entirely different histories.

11 changed files with 93 additions and 128 deletions

View File

@ -5,12 +5,10 @@
#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()
@ -181,9 +179,10 @@ FActiveGameplayEffectHandle UOLSAbilitySystemComponent::ApplyGameplayEffectClass
if (specHandle.IsValid()) if (specHandle.IsValid())
{ {
handle = ApplyGameplayEffectSpecToSelf(*specHandle.Data.Get()); handle = ApplyGameplayEffectSpecToSelf(*specHandle.Data.Get());
OLS_LOG(LogOLSAbilitySystemComponent, Verbose, TEXT("[%s] Effect '%s' granted at level %f."), //@Todo: replace this with our custom log.
GET_UOBJECT_NAME(GetAvatarActor()), GET_UOBJECT_NAME(effectClass), level); UE_LOG(LogAbilitySystemComponent, Verbose, TEXT("[%s] Effect '%s' granted at level %f."),
*GetNameSafe(GetAvatarActor()), *GetNameSafe(effectClass), level);
} }
} }
@ -202,8 +201,9 @@ 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);
OLS_LOG(LogOLSAbilitySystemComponent, Log, TEXT("[%s] Ability '%s' %s at level %d."), //@Todo: replace this with our custom log.
GET_UOBJECT_NAME(GetAvatarActor()), GET_UOBJECT_NAME(abilityClass), UE_LOG(LogAbilitySystemComponent, Log, TEXT("[%s] Ability '%s' %s at level %d."),
*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,7 +217,8 @@ bool UOLSAbilitySystemComponent::TryBatchActivateAbility(
bool isAbilityActivated = false; bool isAbilityActivated = false;
if (abilityHandle.IsValid()) if (abilityHandle.IsValid())
{ {
OLS_LOG(LogAbilitySystemComponent, Warning, TEXT("Ability handle is invalid!")); //@Todo: replace this with our custom log.
// GAS_LOG(Warning, "Ability handle is invalid!");
return isAbilityActivated; return isAbilityActivated;
} }
@ -236,8 +237,9 @@ bool UOLSAbilitySystemComponent::TryBatchActivateAbility(
} }
else else
{ {
OLS_LOG(LogAbilitySystemComponent, Error, // @Todo: replace this with our custom log.
TEXT("%s does not implement Batch Gameplay Ability Interface"), GET_UOBJECT_NAME(ability)); // const FString Message = IsValid(Ability) ? FString::Printf(TEXT("%s does not implement Batch Gameplay Ability Interface"), *GetNameSafe(Ability)) : "is invalid";
// GAS_LOG_ARGS(Error, "Ability %s!", *Message);
} }
} }
} }

View File

@ -1,17 +1,14 @@
// © 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/OLSAbilitySetDataAsset.h" #include "DataAssets/OLSAbilitySetPrimaryDataAsset.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())
@ -69,11 +66,11 @@ void FOLSAbilitySet_GrantedHandles::TakeFromAbilitySystem(UOLSAbilitySystemCompo
GrantedAttributeSets.Reset(); GrantedAttributeSets.Reset();
} }
UOLSAbilitySetDataAsset::UOLSAbilitySetDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer) UOLSAbilitySetPrimaryDataAsset::UOLSAbilitySetPrimaryDataAsset(const FObjectInitializer& objectInitializer) : Super(objectInitializer)
{ {
} }
void UOLSAbilitySetDataAsset::GiveToAbilitySystem( void UOLSAbilitySetPrimaryDataAsset::GiveToAbilitySystem(
UOLSAbilitySystemComponent* olsASC, UOLSAbilitySystemComponent* olsASC,
FOLSAbilitySet_GrantedHandles* outGrantedHandlePtrs, FOLSAbilitySet_GrantedHandles* outGrantedHandlePtrs,
UObject* sourceObject) const UObject* sourceObject) const
@ -93,11 +90,11 @@ void UOLSAbilitySetDataAsset::GiveToAbilitySystem(
if (!IsValid(setToGrant.AttributeSet)) if (!IsValid(setToGrant.AttributeSet))
{ {
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedAttributes[%d] on ability set [%s] is not valid"), //@Todo: Replace this with custom log.
setIndex, GET_UOBJECT_NAME(this)); // UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedAttributes[%d] on ability set [%s] is not valid"), SetIndex, *GetNameSafe(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);
@ -114,8 +111,8 @@ void UOLSAbilitySetDataAsset::GiveToAbilitySystem(
if (!IsValid(AbilityToGrant.Ability)) if (!IsValid(AbilityToGrant.Ability))
{ {
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedGameplayAbilities[%d] on ability set [%s] is not valid"), //@Todo: Replace this with custom log.
abilityIndex, GET_UOBJECT_NAME(this)); // UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedGameplayAbilities[%d] on ability set [%s] is not valid."), AbilityIndex, *GetNameSafe(this));
continue; continue;
} }
@ -140,8 +137,8 @@ void UOLSAbilitySetDataAsset::GiveToAbilitySystem(
if (!IsValid(EffectToGrant.GameplayEffect)) if (!IsValid(EffectToGrant.GameplayEffect))
{ {
OLS_LOG(LogOLSAbilitySetDataAsset, Error, TEXT("GrantedGameplayEffects[%d] on ability set [%s] is not valid"), //@Todo: Replace this with custom log.
effectIndex, GET_UOBJECT_NAME(this)); // UE_LOG(LogLyraAbilitySystem, Error, TEXT("GrantedGameplayEffects[%d] on ability set [%s] is not valid"), EffectIndex, *GetNameSafe(this));
continue; continue;
} }

View File

@ -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/OLSAbilitySetDataAsset.h" #include "DataAssets/OLSAbilitySetPrimaryDataAsset.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 UOLSAbilitySetDataAsset* abilityDataAsset : PawnData->AbilitySets) for (const UOLSAbilitySetPrimaryDataAsset* abilityDataAsset : PawnData->AbilitySets)
{ {
if (abilityDataAsset) if (abilityDataAsset)
{ {

View File

@ -3,7 +3,6 @@
#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"
@ -14,8 +13,6 @@
#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");
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
@ -47,7 +44,8 @@ UOLSAssetManager& UOLSAssetManager::Get()
return *Singleton; return *Singleton;
} }
OLS_LOG_NO_WORLD(LogOLSAssetManager, Fatal, TEXT("Invalid AssetManagerClassName in DefaultEngine.ini. It must be set to LyraAssetManager!")); // @Todo replace this our custom log.
// 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>();
@ -55,15 +53,6 @@ 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()
@ -140,7 +129,8 @@ void UOLSAssetManager::StartInitialLoading()
{ {
// Load base game data asset // Load base game data asset
STARTUP_JOB_WEIGHTED(GetGameData(), 25.f); // @Todo uncomment this after implementing GetGameData().
// STARTUP_JOB_WEIGHTED(GetGameData(), 25.f);
} }
// Run all the queued up startup jobs // Run all the queued up startup jobs
@ -158,7 +148,8 @@ void UOLSAssetManager::PreBeginPIE(bool shouldStartSimulate)
const bool shouldAllowInPIE = true; const bool shouldAllowInPIE = true;
slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE); slowTask.MakeDialog(shouldShowCancelButton, shouldAllowInPIE);
const UOLSGameDataAsset& LocalGameDataCommon = GetGameData(); // @Todo unlock this comment.
// 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);
@ -185,8 +176,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.
OLS_LOG(LogOLSAssetManager, Log, TEXT("Loading GameData: %%s ..."), *dataClassPath.ToString()); // UE_LOG(LogLyra, 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
@ -215,10 +206,8 @@ 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.
OLS_LOG(LogOLSAssetManager, Fatal, // @Todo replace this log with our custom.
TEXT( // 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());
"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;
@ -226,65 +215,64 @@ UPrimaryDataAsset* UOLSAssetManager::LoadGameDataOfClass(
void UOLSAssetManager::DoAllStartupJobs() void UOLSAssetManager::DoAllStartupJobs()
{ {
SCOPED_BOOT_TIMING("UOLSAssetManager::DoAllStartupJobs"); SCOPED_BOOT_TIMING("ULyraAssetManager::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 FOLSAssetManagerStartupJob& startupJob : StartupJobs) // for (const FLyraAssetManagerStartupJob& 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 FOLSAssetManagerStartupJob& startupJob : StartupJobs) // for (const FLyraAssetManagerStartupJob& StartupJob : StartupJobs)
{ // {
totalJobValue += startupJob.JobWeight; // TotalJobValue += StartupJob.JobWeight;
} // }
//
float accumulatedJobValue = 0.0f; // float AccumulatedJobValue = 0.0f;
for (FOLSAssetManagerStartupJob& startupJob : StartupJobs) // for (FLyraAssetManagerStartupJob& 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();
OLS_LOG(LogOLSAssetManager, Display, TEXT("All startup jobs took %.2f seconds to complete"), // @Todo replace this with our custom log.
FPlatformTime::Seconds() - allStartupJobsStartTime); // UE_LOG(LogLyra, Display, TEXT("All startup jobs took %.2f seconds to complete"), 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();
@ -292,6 +280,5 @@ 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
} }

View File

@ -3,16 +3,13 @@
#include "Systems/OLSAssetManagerStartupJob.h" #include "Systems/OLSAssetManagerStartupJob.h"
#include "OLSLog.h"
DEFINE_LOG_CATEGORY(LogOLSAssetManagerStartupJob);
TSharedPtr<FStreamableHandle> FOLSAssetManagerStartupJob::DoJob() const TSharedPtr<FStreamableHandle> FOLSAssetManagerStartupJob::DoJob() const
{ {
const double jobStartTime = FPlatformTime::Seconds(); const double jobStartTime = FPlatformTime::Seconds();
TSharedPtr<FStreamableHandle> handle; TSharedPtr<FStreamableHandle> handle;
OLS_LOG_NO_WORLD(LogOLSAssetManagerStartupJob, Display, TEXT("Startup job \"%s\" starting"), *JobName); // @Todo replace this with our custom log.
// UE_LOG(LogLyra, Display, TEXT("Startup job \"%s\" starting"), *JobName);
JobFunc(*this, handle); JobFunc(*this, handle);
if (handle.IsValid()) if (handle.IsValid())
@ -22,8 +19,8 @@ TSharedPtr<FStreamableHandle> FOLSAssetManagerStartupJob::DoJob() const
handle->BindUpdateDelegate(FStreamableUpdateDelegate()); handle->BindUpdateDelegate(FStreamableUpdateDelegate());
} }
OLS_LOG_NO_WORLD(LogOLSAssetManagerStartupJob, Display, TEXT("Startup job \"%s\" took %.2f seconds to complete"), // @Todo replace this with our custom log.
*JobName, FPlatformTime::Seconds() - jobStartTime); // UE_LOG(LogLyra, Display, TEXT("Startup job \"%s\" took %.2f seconds to complete"), *JobName, FPlatformTime::Seconds() - jobStartTime);
return handle; return handle;
} }

View File

@ -6,8 +6,6 @@
#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

View File

@ -5,10 +5,7 @@
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "GameplayTagContainer.h" #include "GameplayTagContainer.h"
#include "OLSPawnDataAsset.h" #include "OLSPawnDataAsset.h"
#include "OLSAbilitySetDataAsset.generated.h" #include "OLSAbilitySetPrimaryDataAsset.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(LogOLSAbilitySetDataAsset, Verbose, All);
/** /**
* FOLSAbilitySet_GameplayAbility * FOLSAbilitySet_GameplayAbility
* *
@ -105,20 +102,15 @@ protected:
TArray<TObjectPtr<class UAttributeSet>> GrantedAttributeSets; TArray<TObjectPtr<class UAttributeSet>> GrantedAttributeSets;
}; };
/** UCLASS()
* UOLSAbilitySetDataAsset class OLS_API UOLSAbilitySetPrimaryDataAsset : public UOLSPawnDataAsset
*
* 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:
UOLSAbilitySetDataAsset(const FObjectInitializer& objectInitializer); UOLSAbilitySetPrimaryDataAsset(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.

View File

@ -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 UOLSAbilitySetDataAsset>> AbilitySets; TArray<TObjectPtr<class UOLSAbilitySetPrimaryDataAsset>> 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")

View File

@ -29,12 +29,6 @@
*/ */
#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)

View File

@ -6,7 +6,6 @@
#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
{ {

View File

@ -4,7 +4,6 @@
#include "Engine/StreamableManager.h" #include "Engine/StreamableManager.h"
DECLARE_LOG_CATEGORY_EXTERN(LogOLSAssetManagerStartupJob, Verbose, All);
DECLARE_DELEGATE_OneParam(FOLSAssetManagerStartupJobSubstepProgress, float /*newProgress*/); DECLARE_DELEGATE_OneParam(FOLSAssetManagerStartupJobSubstepProgress, float /*newProgress*/);