https://github.com/tranek/GASDocumentation#concepts-ga
단순히 위의 문서를 보고 제멋대로 해석해서 적은 것입니다. 차라리 위의 문서를 봐주세요. 저 영어 못 합니다.
4.9 Ability System Globals
AbilitySystemGlobals 클래스는 GAS에 대한 글로벌 정보를 가지고 있다. 대부분의 변수는 DefaultGame.ini에서 세팅될 수 있다. 보통 이 클래스와 상호작용할 일이 없을 것이다. 그러나 이것이 존재한다는 것은 알아야 한다. 만약 GameplayCueManager나 GameplayEffectContext의 하위 클래스가 필요하다면 AbiltySystemGlobals를 통해 할 수 있다.
AbilitySystemGlobals의 하위클래스를 만들기위해 DefaultGame.ini에서 클래스 이름을 세팅한다.
[/Script/GameplayAbilities.AbilitySystemGlobals] AbilitySystemGlobalsClassName="/Script/ParagonAssets.PAAbilitySystemGlobals"
4.9.1 InitGlobalData()
UE4.24에서는 TargetData를 사용하기 위해서는 UAblitySystemGlobals::Get().InitGlobalData()를 호출할 필요가 있다. 그러나 ScriptStructCahce에 대한 에러를 받을 것이며, 클라이언트는 서버와 연결이 끊어질 것이다. 이 함수는 프로젝트에서 단 한번만 호출되어야 한다. 포트나이트는 UAssetManager::StartInitalLoading()에서 호출하고, 파라곤은 UEngine::Init()에서 호출한다. 샘플프로젝트에선 UAssetManager::StartInitalLoading()에 넣는게 좋은 장소라는 것을 알았다. TargetData와의 이슈를 피하기 위해서 이 보일러플레이트 코드를 당신의 프로젝트에 복사하는 것을 추천한다.
만약 AbilitySystemGlobals GlobalAttributeSetDefaultsTableNames를 사용하면서 크래시가 발생했다면, 포트나이트처럼 AssetManager나 GameInstance안에서 UAbilitySystemGlobals::Get().InitGlobalData()를 호출할 필요가 있을 수 있다.
'Unreal Engine > Gameplay Ability System' 카테고리의 다른 글
[UE] Gameplay Ability System -10- Targeting (0) | 2023.06.04 |
---|---|
[UE] Gameplay Ability System -9- Prediction (0) | 2023.06.03 |
[UE] Gameplay Ability System -7- Gameplay Cue (0) | 2023.06.02 |
[UE] Gameplay Ability System -6- Ability Task (0) | 2023.05.30 |
[UE] Gameplay Ability System -5- Gameplay Ability (0) | 2023.05.30 |