보키_기록용

[GameplayAbilitySystem] DOREPLIFETIME_CONDITION_NOTIFY에 대해 (Prediction) 본문

언리얼/Framework

[GameplayAbilitySystem] DOREPLIFETIME_CONDITION_NOTIFY에 대해 (Prediction)

bokki0117 2022. 9. 1. 16:47

Attribute Set 생성 시 어트리뷰트 프로퍼티를 리플리케이션할 때 DOREPLIFETIME_CONDITION_NOTIFY를 사용했었다.

void UGASTestAttributeSet::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
	Super::GetLifetimeReplicatedProps(OutLifetimeProps);
	
	DOREPLIFETIME_CONDITION_NOTIFY(ULyraHealthSet, Health, COND_None, REPNOTIFY_Always);
}

 

DOREPLIFETIME가 일반적이지만 클라이언트 측 ability prediction관련으로 복잡한 오류가 발생되서 DOREPLIFETIME_CONDITION_NOTIFY를 쓴다는데.. ability prediction가 뭔지 몰라서 조사해봤다.

 

GAS(Gamepaly Ability System)은 Replication관련해서 클라이언트 측 예측이 기본제공된다. (모든 것을 예측하진 않음.)

이 의미는 클라이언트가 Gameplay Ability나 GameplayEffect를 활성화하고 적용하기 위해서 서버의 권한을 기다릴 필요가 없다는 것을 의미한다. 이 작업을 수행할 수 있는 권한을 부여하는 서버를 "예측"하고 적용할 대상을 예측할 수 있다.

그런 다음 서버는 클라이언트가 활성화된 후 네트워크 대기 시간을 실행하고 클라이언트가 자신의 예측이 맞았는지 여부를 알려준다. 클라이언트가 그의 예측 중 하나라도 틀렸다면 그는 서버와 일치하도록 "잘못 예측"에서 변경 사항을 "롤백"한다.

 

그렇다고 한다..

 

Gameplay Abilities and You - UE4: Guidebook (gg-labs.com)

 

Gameplay Abilities and You - UE4: Guidebook

Well, first of all, GameplayAbilities is a code module that used to be integrated into UE4's source, but since this current version (4.15, that is, people from the future) has been moved into a separate plugin that is delivered alongside the Unreal Engine,

unreal.gg-labs.com

GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 4's GameplayAbilitySystem plugin with a simple multiplayer sample project.

 

GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 4's GameplayAbilitySystem plugin with a simple multiplayer s

My understanding of Unreal Engine 4's GameplayAbilitySystem plugin with a simple multiplayer sample project. - GitHub - tranek/GASDocumentation: My understanding of Unreal Engine 4's Gamepl...

github.com

 

Comments