You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to setup the GAS on a project, I could not for the life of me understand how to setup IGameplayAbilitiesModule::Get().GetAbilitySystemGlobals()->GetAttributeSetInitter()->InitAttributeSetDefaults(...).
Calling GetAttributeSetInitter() always crashed, and IsAbilitySystemGlobalsInitialized() always returned false. I added #include "AbilitySystemGlobals.h", setup a a custom Asset Manager in Project Settings that calls UAbilitySystemGlobals::Get().InitGlobalData(); inside StartInitialLoading() override { ...}, tried the function in various places (a class derived from UAttributeSet, a class derived from ACharacter that implements IAbilitySystemInterface, other custom classes) to no avail.
Where CT_GlobalAttributes is an imported curve table.
Since it took me a dozen hours to figure this out due to how obscure the setup of GAS can be, I think it is worth mentioning in your GASDocumention (which otherwise has been a great help). Cheers!
The text was updated successfully, but these errors were encountered:
Hello!
While trying to setup the GAS on a project, I could not for the life of me understand how to setup
IGameplayAbilitiesModule::Get().GetAbilitySystemGlobals()->GetAttributeSetInitter()->InitAttributeSetDefaults(...)
.Calling
GetAttributeSetInitter()
always crashed, andIsAbilitySystemGlobalsInitialized()
always returned false. I added#include "AbilitySystemGlobals.h"
, setup a a custom Asset Manager in Project Settings that callsUAbilitySystemGlobals::Get().InitGlobalData();
insideStartInitialLoading() override { ...}
, tried the function in various places (a class derived from UAttributeSet, a class derived from ACharacter that implements IAbilitySystemInterface, other custom classes) to no avail.The fix for me was tipped by a comment in that repo: https://github.com/DaedalicEntertainment/ue4-orders-abilities/blob/develop/Source/OrdersAbilities/Private/AbilitySystem/RTSAbilitySystemComponent.cpp
In DefaultGame.ini, add a line such as this:
Where
CT_GlobalAttributes
is an imported curve table.Since it took me a dozen hours to figure this out due to how obscure the setup of GAS can be, I think it is worth mentioning in your GASDocumention (which otherwise has been a great help). Cheers!
The text was updated successfully, but these errors were encountered: