How to expose SteamID to blueprints

I have a PlayerState class child that obviously have FUniqueNetIdRepl UniqueId inherited that is a 32bit signed integer
but SteamID is a 64bit unsigned integer.

Like as subject, how i can expose the real steamID, so in “STEAM_X:X:XXXXXX” format to blueprints?

Some help?

You need to expose it to Blueprint via c++, here is an example:

//Check if Steam can Initiate, then get the SteamID and convert it to uint64
	if (SteamAPI_Init()){
		CSteamID steamID = SteamUser()->GetSteamID();

		uint64 Return = steamID.CSteamID::ConvertToUint64();

		//Return ID as String if Found
		return FString::FromInt(Return);
         }

Im returning it as a FString because blueprints can’t handle uint64, but you can convert it to another type if you need to.

Kind Regards Alex

Hi, there, thank you for your discussion. I am trying to get a Steam ID, i performed the command that you mentioned above but as a result, I got 9 digits of Steam ID(I cannot say 100% for sure if this is an ID or not.) Steam ID is basically 17 digits, Can anybody please solve the problem?

First of all, does this work in UE4.15? Secondly, should this be added to an existing C++ file (and if so, in which one?) or should this be put in a new file? Please assume no C++ knowledge from me.

idk about before, but in 4.24 the declaration FString::FromInt() is:
FString FromInt( int32 Num );
so passing uint64 to it doesn’t seem ok! (also the same problem with AppendInt)
to convert unit64 to FString I am using the following, and it seems fine:

	CSteamID csteamid = ...;
	FString steamId;
	uint64 id64 = csteamid.ConvertToUint64();
	while(id64 > 0) {
		steamId.AppendInt(id64 % 10);
		id64 /= 10;
	}
	steamId.ReverseString();

btw, there is already method : CSteamID::Render()
but I got linking error when I used it … unresolved external error …etc

This is what I have:

#include "BPFL_Steam.h"
#include "ThirdParty/Steamworks/Steamv142/sdk/public/steam/steam_api.h"

FString UBPFL_Steam::GetSteamIDByString()
{
	FString returnvalue;
	if (SteamAPI_Init())
	{
		uint64 Sid{ 0 };
		CSteamID InSteamID = SteamUser()->GetSteamID();
		Sid = InSteamID.ConvertToUint64();
		if (Sid == 0)
		{
			returnvalue = "BadSteamId";
		}
		else
		{
			returnvalue = FString::Printf(TEXT("%llu"), Sid);
		}
	}
	else
	{

		returnvalue = "NoSteamConnection";
	}

	return returnvalue;
}