Steamworks Callback fails to compile in UE4 - Error Unrecognized Type GameOverlayActivated_t , Must be UCLAS, USTRUCT or ENUM
Hello, I am trying to work with Steamworks lately, and I am trying to do a simple event of pausing my game when the Steam Game Overlay becomes active.
I created a c++ Game Instance class in my game, and I can load it up in the game, as I can create and modify a variable in it. When I write the following code
And then in cpp file
The problem I have, is that the c++ compile for UE4 says that GameOverlayActivated_t is not a valid structure. I haven't been able to find anything on this problem online. I am quite noob when it comes to Steamworks coding, and I am having a lot of trouble understanding the documentation just like that. Examples would be best. Like, it has an example for Call Results, but not really for Callbacks at https://partner.steamgames.com/documentation/getting_started
I managed to solve this after some tinkering. I have no idea if the Steamworks function I am trying to implement works at all, but at least it compiles now.
Header ended like this
I had to change OnSteamOverlayEnabled from Void to Bool, and get rid of the UFUNCTION macro.
On the CPP file I have the same include files as before but I had to change the OnSteamOverlayEnable code,
With those changes it compiles.
answered Feb 17 '17 at 08:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here