Okay so the entirety of the documentation on integrating the Steam API with a UE4 project is pretty spotty, but it seems that everyone is saying that you basically have to do nothing to make Steam work with your project. Once you add those lines to the Target.cs and Build.cs and make sure you have the DLL files, you regenerate your project files and you’re good to go.
So if that’s true, I need help here, because I’m trying to access some Steam functions and they’re not working.
Here’s a list of everything that I need from the Steam API:
- Active player’s unique Steam ID
- Active player’s Steam Nickname
- Player’s friends’ Steam ID’s and aliases
I’ve seen tutorials on how to do achievements, but I cannot find anywhere where anyone access the SteamUser() or SteamFriends() functions. Whenever I do, I get an unresolved symbol error, so I include “steam_api.h”, but then I get an unresolved linker error, like it cannot find the .lib files. Once I point to those, it compiles, but the engine supposedly works without me having to manually include the libs.
Is there some OnlineSubsystem function that accesses this information for me?
Okay so I just found this piece of documentation:
But I can’t figure out just what methods to use to get an FOnlineUser or an FOnlineFriend instance.
I see the GetIdentityInterface() method on OnlineSubsystemSteam, but I have no idea how to access it. I also see GetFriendsInterface(), but still no idea. Those have got to be the two methods I’m looking for, but I don’t know where to start with accessing the OnlineSubsystem.
Okay, so I’ve added:
to my header, but I still do not have any access to FOnlineSubsystemSteam. The type is still considered undefined.