반응형
Meta Attribute란?
상태(state)가 아닌 Attribute
- Health, Mana, Stamina → 상태
- IncomingDamage → 계산 입력값
즉,
- “현재 데미지가 몇이다”가 아니라
- “이번 Effect에서 들어온 데미지 값”
이건 지속 상태로 유지될 이유가 없는 값이다.
➡️ GAS 설계상 이런 값은 Meta Attribute로 분류된다.
따라서 Meta Attribute는 보통 Replicate 대상이 아님
Meta Attribute는 왜 Replication을 안 하나?
Meta Attribute의 성격
- IncomingDamage
- OutgoingDamage
- Damage
- HealingDone
이런 것들은:
- 계산 중간값
- 한 프레임 / 한 Effect 단위
- PostGameplayEffectExecute에서 소비 후 폐기
➡️ 복제해도 의미가 없고,
➡️ 오히려 네트워크 낭비 + 타이밍 오류 유발
그래서 “Meta Attribute는 Replication하지 않는다”가 관례처럼 굳은 것이지,
엔진 레벨에서 막혀 있는 건 아니다.
중요한건, 아래처럼 Replicate 대상인 Attribute에 대해서 해주는 처리들도 Meta Attribute들에 대해선 해주지 않음
UPROPERTY(BlueprintReadOnly, ReplicatedUsing=OnRep_Health)
FGameplayAttributeData Health;
UFUNCTION()
void OnRep_Health(const FGameplayAttributeData& OldHealth);
void UAuraAttributeSet::GetLifetimeReplicatedProps(
TArray<FLifetimeProperty>& OutLifetimeProps) const
{
DOREPLIFETIME_CONDITION_NOTIFY(
UAuraAttributeSet,
Health,
COND_None,
REPNOTIFY_Always
);
}
따라서 클라에서 GetIncomingDamage를 호출해도 올바른 정보를 리턴하지 않음

반응형
'공부 > UE' 카테고리의 다른 글
| [UE] 언리얼 네트워크 프로그래밍 - GameMode와 로그인 (0) | 2026.02.08 |
|---|---|
| [UE] PreAttributeChange가 아니라 PostGameplayEffectExecute에서 Clamp 해야 하는 이유 (0) | 2025.11.02 |
| [UE] GameplayEffect의 Stack 여부에 따른 Tag 중첩 (0) | 2025.10.20 |
| [UE] Controller에 접근하는 방법들 (0) | 2025.10.19 |
| [UE5] PlayerState, PlayerController의 Replicate 시점 (0) | 2025.10.14 |