So I’ve spent the last 4 days attempting to find the answer and have read through pretty much every post out there on this.
OnlineSubsystem has already been enabled and all that just not sure how to write this function.
In the documentation for Online IdentityInterface it States
I cannot find anything on HOW to implement this because this is the extent of the documentation on that I can find.
Just want to set it up as a function that returns the UniqueID.
I’m a complete noob at C++ but years of experience in PHP and JS / JS variants… Any help is appreciated been stuck on this almost all week and i feel it should pretty dam simple to retrieve a var that already exists lol
Alright I attempted to write the function but I’m getting a return of GetUniquePlayerID undefined, I’m sure I’m missing a header or have the improper one selected. Sorry, I’m such a moron I did JS, PHP and web side technologies for years but for some reason, I’m struggling with the C++ side of this part.
The UPROPERTY needs to be in your header. It’s a variable for your class, not your method. Also you need to access the Online Subsystem singleton to get the Identity interface (which has the GetUniquePlayerId call).
I tried to download the shootergame example but cannot find it on the unreal site, or in the unreal editor. Is it under templates? or in the Learn Unreal section?
EDIT: Nevermind I found it in the Epic Games Launcher under Learn and at the very bottom. Then click the cloud icon.