FString UMobileUtility::GetIPAddress()
{
FString IpAddr("NONE");
bool canBind = false;
TSharedRef<FInternetAddr>LocalIp = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->GetLocalHostAddr(*GLog, canBind);
if (LocalIp->IsValid())
{
//If you want to add a port, write ture
IpAddr = LocalIp->ToString(false);
}
return IpAddr;
}
반응형
'게임엔진(GameEngine) > Unreal4' 카테고리의 다른 글
This Repository shows a Code Example of how to use UE4 Online Subsystem Sessions in C++. (0) | 2022.08.04 |
---|---|
What does Get Player Controller (Player index = 0) return in multiplayer? (0) | 2022.07.27 |
UFUNCTION BlueprintCallable, BlueprintImplementableEvent, .. (0) | 2022.07.19 |
블루프린트에서의 멀티플레이어 (0) | 2022.07.13 |
UE5 특징 (0) | 2022.06.16 |