Get Device ID returning empty

In an application using 4.25 I’ve been using Get Device ID node to return an unique id for connected players, but after update to 4.26 the same node is returning empty, is it a bug or this node is now deprecated?

The plataform is Windows 10 btw…

1 Like

I’ve implemented my own DeviceID using the old code, but it’s sucks to return an empty string in a function that was working in a Version before.

I have the same problem

Looks like some deprecation is going on. If removing GetHashedMacAddressString from desktop was intentional or not, I don’t know.

From version 4.25:

FString FGenericPlatformMisc::GetUniqueDeviceId()
{
	PRAGMA_DISABLE_DEPRECATION_WARNINGS
	return FPlatformMisc::GetHashedMacAddressString();
	PRAGMA_ENABLE_DEPRECATION_WARNINGS
}

FString FGenericPlatformMisc::GetDeviceId()
{
	// @todo: When this function is finally removed, the functionality used will need to be moved in here.
	PRAGMA_DISABLE_DEPRECATION_WARNINGS
	return GetUniqueDeviceId();
	PRAGMA_ENABLE_DEPRECATION_WARNINGS
}

FString FGenericPlatformMisc::GetUniqueAdvertisingId()
{
	// this has no meaning generically, primarily used for attribution on mobile platforms
	return FString();
}

I have same problem. Do you have more information about or any solution?

1 Like

I’m waiting the next version, but to solve my problem with 4.26 I’ve implemented a function that returns:

return FGenericPlatformMisc::GetHashedMacAddressString();

Because that was the behavior of GetDeviceId() in version 4.25.

Thank you for reply. I have blueprint project only and unfortunately I am not skilled in C++ programming. So I don’t know how to implement function. It is a huge problem for me now.

Is there any way how to implement with blueprints please? Or make plugin for that? Thank you

unfortunately a plugin just to do it isn’t worthy the effort… And using blueprints there’s no other way to get this value :frowning:

I have to find another way. Thank you for answer.

I figured it out with node - “Get Platform User Name” :slight_smile:

1 Like

just shooting into the dark here but following the bottom lines on FGenericPlatformMisc::GetDeviceId | Unreal Engine Documentation
it reads “set GET_DEVICE_ID_UNAVAILABLE=1 in your build step to ensure that any calls that may be made to this API will simply return an empty string.”
So maybe this is the new default and you need to set GET_DEVICE_ID_UNAVAILABLE=0 in your build step

Same issue with 5.0. Found this plugin at UE marketplace and it works: