Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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:
    3,814
  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:
    81
    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:
    22
    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:
    2
    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.
     
unityunity