반응형
싱글플레이에서는 Widget Interaction으로 3D Widget의 Button을 클릭하면
정상적으로 작동하던 것이 멀티플레이에서는 안되는 경우에 많이들 당황했을 거임
이를 해결하는 방법은 의외로 간단함
각 클라이언트의 플레이어가 가지고 있는 Widget Interaction의 Pointer Index를
플레이어마다 다 다르게 설정해줘야함
static int playerId;
UFUNCTION(BlueprintPure)
const int GetPlayerId();
int ATPSPlayer::playerId = 0;
const int ATPSPlayer::GetPlayerId()
{
return playerId++;
}
static 변수를 만들어 주고
WidgetInteraction에 가상 사용자 인덱스와 포인터 인덱스를 설정해줌
반응형
LIST
'UE5' 카테고리의 다른 글
UE Json File 불러와서 UStruct에 저장 (0) | 2023.06.20 |
---|---|
“Cast of nullptr to AnimationBlendSpaceSampleGraph failed.” (0) | 2023.05.22 |
UE Multi Spawn Actor Replication (0) | 2023.05.04 |
UE5 Multi SetTimer 안될때 (0) | 2023.05.04 |
UE Multi Niagara Spawn (0) | 2023.05.03 |