Search Unity

Steam achievements and IL2CPP problem.

Discussion in 'Editor & General Support' started by SamuraiG, May 30, 2020.

  1. SamuraiG

    SamuraiG

    Joined:
    Oct 27, 2017
    Posts:
    6
    Hi,

    i have added some achievements in the Steam web portal, things are working on the editor and the popup appears when unlocking the achievements, things are also working when I build with Mono.

    The problem occurs when I build my game with IL2CPP, the popup doesn't appear and no achievements get unlocked when I checked on the Steam app, Steam leaderboards are working fine with IL2CPP.

    I am wondering if anybody has faced this before and found a solution. I will really appreciate your help.

    Thanks.
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
  3. SamuraiG

    SamuraiG

    Joined:
    Oct 27, 2017
    Posts:
    6
    Thank you for the link. The game is building okay and I don't get any compiling errors or warnings about the IL2CPP restrictions, so I suppose my code doesn't infringe on these restrictions.

    Btw, i have uploaded the IL2CPP build to Steam and downloaded the game, looks like no Steam functionality is working, including leaderboards and achievements. The Mono build build works like a charm.

    I would really appreciate any help.
    Thanks.
     
  4. BonneCW

    BonneCW

    Joined:
    Jan 22, 2017
    Posts:
    123
    Are you using Facepunch or another wrapper for the Steam API? We use Facepunch and it works with il2cpp without problems.
     
  5. TheFellhuhn

    TheFellhuhn

    Joined:
    Feb 3, 2017
    Posts:
    42
    I alsoused Steamworks.Net and it just doesn't support IL2CPP as it doesn't support marshalling generic (or something like that) and therefore the callbacks don't work at all. Someone there posted a branch where it works and I have been using that since then and had no problems. Works for Windows and Linux: https://codeload.github.com/GMMan/Steamworks.NET/zip/manual-callbacks
     
  6. BenBeagley

    BenBeagley

    Joined:
    Nov 22, 2018
    Posts:
    4
    Just in case anyone else comes across this looking for a complete solution:
    https://wiki.facepunch.com/steamworks/
    Garry from Garry's Mod made a C# wrapper for Unity that works in IL2CPP, and makes a lot of things easier in general.
     
    SpinTheDaddy likes this.
  7. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    It works fine and overall very good wrapper. I currently have issue if I call update leaderboards score several times subsequently. After 4-5 calls is just stops updating (no error, exception or anything) retrieving data still works fine though. It just update ( best score, or replace ) does not affect anymore.
     
  8. Geoffc

    Geoffc

    Joined:
    Feb 4, 2013
    Posts:
    39
    Yes this is good but I am having trouble listing achievements to a text mesh pro component, I can not find examples of how to send achievements to a text string only an int value.