| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- UI
- Multiplay
- gameplay tag
- gameplay ability system
- gas
- 보안
- listen server
- 게임개발
- local prediction
- rpc
- 언리얼 엔진
- linear regression
- os
- animation
- MAC
- C++
- unity
- Unreal Engine
- Aegis
- 언리얼엔진
- ability task
- Replication
- widget
- stride
- 게임 개발
- 유니티
- CTF
- gameplay effect
- photon fusion2
- attribute
Archives
- Today
- Total
Replicated
** [Drag Down] Local Prediction시 외부 컴포넌트의 동기화 ** 본문
아무리 예측 실행을 하고, FScopedPredictionWindow을 켜놔도
다른 액터 컴포넌트의 값을 변화시키는 것은 해당 변수에 Replicated 달아놔야 한다
이걸 어떻게 알았냐면
동영상 서비스가 종료되어 해당 콘텐츠를 재생할 수 없습니다.
스테미나가 최종적으론 동기화되긴 하는데, 예측 실행이랑 달라서 보정되는게 보인다
그럼 예측 실행에선 스테미나를 계속 20씩 깎는다는 거다

로그 찍으니 동기화 안됐다
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "DDAttackStateComponent.generated.h"
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class DRAGDOWN_API UDDAttackStateComponent : public UActorComponent
{
GENERATED_BODY()
public:
UDDAttackStateComponent();
FORCEINLINE int8 GetAttackState() { return NowAttackState; }
void PlusAttackState();
FString GetSectionPrefix();
float GetPower();
float GetZPower();
float GetNecessaryStamina();
private:
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
UPROPERTY()
TObjectPtr < class UDDStateDrivenAttackData > StateDrivenAttackData;
UPROPERTY(Replicated)
int8 NowAttackState;
int8 MaxAttackState;
};
void UDDAttackStateComponent::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(UDDAttackStateComponent, NowAttackState);
}
생각해보면 예측, 권위 실행이 동기화를 해주는 건 아니다
어찌보면 당연히 해줘야 하는 것
대신 예측 실행이 잘 작동하고 있구나 오히려 확인 가능했다
동영상 서비스가 종료되어 해당 콘텐츠를 재생할 수 없습니다.
정상 작동한다
'언리얼 엔진 > Drag Down' 카테고리의 다른 글
| [Drag Down] Local Prediction 스테미나 자동 회복 시스템 Engine & Bug in Gameplay Effect (비추천) (0) | 2025.04.05 |
|---|---|
| [Drag Down] 스테미나 자동 회복 시스템 (문제.. 동기화가 느림) (0) | 2025.04.03 |
| [Drag Down] 멀티 환경에서 스테미나 UI 제작 및 GAS 연결 (0) | 2025.04.02 |
| [Drag Down] 이펙트로 어트리뷰트 사용 처리, 어트리뷰트 부족 시 어빌리티 사용 제한하기 (0) | 2025.04.02 |
| [Drag Down] Gameplay Tag로 어빌리티 꼬임 방지 (0) | 2025.04.02 |