Search Unity

Steamworks leaderboards working in Unity editor but not in standalone build?

Discussion in 'Editor & General Support' started by DaveBigHead, Mar 16, 2018.

  1. DaveBigHead

    DaveBigHead

    Joined:
    Jun 20, 2016
    Posts:
    10
    I have a working game live on Steam, I am now trying to make a demo version of the game, basically I cut out menu links so you can only play a couple of levels/modes. The original game works fine using Steamworks leaderboards.
    In the demo build the code is identical and all I have changed is the appID, and the demo works perfectly when run from the editor, but as soon as I make a standalone build and run it or upload it to Steam and download it using a red developer key and run it the demo runs fine but it can't read or write to the leaderboards...it gets the player name and friend count etc. it simply can't read or write to the leaderboards.
    So given the code is the same as the game, and the demo works fine in the Unity editor I have to assume there is something passed from the Editor, maybe the access level/preferences that allows it to talk to Steam but when built as standalone these things are not passed over and so it fails to talk to it.
    Has anyone had this, seen it or got any clues?
    I have read in forums and found it to be true that to get them to work from the Unity editor you have to run Steam and run Unity as administrator and that makes me think it's something similar.
    Also to note I have done nothing different to when I uploaded the full game and it just worked making me think maybe there is something odd about how demos work, as they are a 'subset' of the full game.
    Getting pretty desperate now having spent a week trying to find a solution.
    Even if you don't know the solution but you do know how to talk directly to a Steam tech support that would be a big help as posting in their forums hasn't been fruitful so far!
     
  2. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    137
    I'm having the same trouble as you. It was working perfectly but now I've relalized that leaderboards don't work on the retail version. In unity editor everything is ok :S
     
  3. DaveBigHead

    DaveBigHead

    Joined:
    Jun 20, 2016
    Posts:
    10
    I'm sad to hear that, I didn't resolve it in time so I took the leaderboards out (it was a demo version)...I did get an offer of support via Steam Publish <SteamPublish@valvesoftware.com> and they offered to help so it might be worth contacting them. Where I got to with it was proving everything worked fine, it did exactly as expected via the Unity editor...but running a standalone exe it failed to accept the callback so clearly there was some hierarchy level that wasn't being passed over from the exe. Lots of people suggested it was the appID but it wasn't clearly wasn't I even used the getappid callback to check it at each stage. One thing to note, you do need to run the exe as administrator and run steam as administrator they need to be at the same permissions level but if not it'll report a different error anyway so you should be able to spot it. Good luck with it and please do report back here if you find a solution. I will return to trying to fix it when I get some time.
     
  4. SVC-Games

    SVC-Games

    Joined:
    May 21, 2013
    Posts:
    137
    I've opened a report on facepunch.steamworks github but no response yet. The game was compiled and uploaded back in JANUARY and it have been working perfectly for months. It's since the other day that I noticed leaderboards weren't working anymore.

    When using the January code in editor it works and the log shows that there's no trouble connecting.

    I've uploaded a recompiled version to a beta repository and the game reports that whenever trying to connect to a leaderboard it returns isError = true.

    I don't know what happened but it certainly must be a change on steam's side, since that code was working without a hitch for months and in fact I have several entries on the leaderboards if I check the steam administration page of the game
     
  5. john-jds

    john-jds

    Joined:
    Oct 15, 2014
    Posts:
    7
    Has this been resolved? I'm noticing the same behavior. Leaderboards function in editor (finding, uploading, downloading), but do not on standalone build. I'm using Steamworks.NET currently, and trying to isolate the issue.
     
  6. john-jds

    john-jds

    Joined:
    Oct 15, 2014
    Posts:
    7
    Again, sorry to wake an old thread, but worth updating with progress.

    For us, the issue was building standalone with IL2CPP vs mono. It appears that if we build with mono then the leaderboards function fine on standalone.

    We are using the steammanager.NET package and it seems to have issues with the leaderboard functions and IL2CPP. We were already successfully using stats and leaderboards functions using steammanager.NET and IL2CPP standalone builds. But, when we added functionality for leaderboards, it would only work in editor and on standalone builds using mono as the scripting back end. IL2CPP would cause FindLeaderboard to fail. So for now, we're switching to mono, and we'll look into replacing steammanager.NET with Facepunch if it all works fine with IL2CPP. We'll also log the issue with the steammanager.NET git. Weird.
     
    drew767 likes this.
  7. drew767

    drew767

    Joined:
    Jun 10, 2018
    Posts:
    2
    Thank you so much! That worked for me.
    I would never think the problem was in that configuration.