Unreal Cpp 获取本机IP地址
FString UCT3FunctionLibrary::GetLocalIPAddress() { FString IpAddr("NONE"); bool bCanBind = false; TSharedRef<FInternetAddr> localIp = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->GetLocalHostAddr(*GLog, bCanBind); if (localIp->IsValid()) { IpAddr = localIp->ToString(false); } return IpAddr; }