Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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

Steamworks for Unity

Discussion in 'Assets and Asset Store' started by reallyjoel1, Nov 2, 2011.

  1. danny_sauropod

    danny_sauropod

    Joined:
    Feb 27, 2014
    Posts:
    5
    Thanks SteveB, it works now! I had put it in the /Assets folder.

     
  2. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,448
    Yay!!! You're welcome, and yea I wish there was a more robust Unity-Steam community here. It's surprising since I suspect quite a few people are making PC games, and sure while they may not want to use Steam, I have to believe a lot do so...

    ...here's hoping if we keep talking about it it will happen! :D

    Cheers

    -Steven
     
    CoolBeat likes this.
  3. danny_sauropod

    danny_sauropod

    Joined:
    Feb 27, 2014
    Posts:
    5
    Yup, getting the same Sparty.

     
  4. danny_sauropod

    danny_sauropod

    Joined:
    Feb 27, 2014
    Posts:
    5
    Anyone has an example of how to use Steamworks.SteamInterface.User.GetAuthSessionTicket (IntPtr ticket, int maxTicket)? I can't seem to get an actual session ticket out of it...

    Thanks!
     
  5. Ocid

    Ocid

    Joined:
    Feb 9, 2011
    Posts:
    476
    As I'm not at the point of considering integrating steam yet or even looked into the system for it.

    Is it not more of a case of people either rolling their own or waiting till they through greenlight before they start to consider integrating steamworks.
     
  6. Invent4

    Invent4

    Joined:
    Aug 20, 2012
    Posts:
    14
    Hi There,

    Does anyone have already used the UGCQuery ?

    I'm with troubles on this, my game is on Steam, users can share Maps (Steam Workshop), but since the last update on Steam DLL this function doesn't work anymore.
    The original code was based on "SteamInterface.Cloud.EnumeratePublishedWorkshopFiles" and was working until de end of 2013.
    This Cloud functions, and workshop work seems to be changed to the UGCQuerys, (SteamInterface.UGC.CreateQueryAllUGCRequest), but I didn't found any documentation on Ludosity site, and I didn't get a repply on this.

    Any help would be welcome,

    Thanks in advance.
     
  7. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    Is there any news on the 64-bit linux version? My customers are crying out for linux64. Unity and Steamworks SDK both support, but I cannot ship due to Ludosity wrapper not.

    Any updates on when it should/could be coming as the docs states it's in the pipeline, stay tuned (or similar).

    Cheers in advance,
    Matt.
     
  8. Knil

    Knil

    Joined:
    Nov 13, 2013
    Posts:
    49
    Any ideas why I'm getting NoAuth as the response from SteamInterface.User.UserHasLicenseForApp()? How do I verify a license?

    Thanks!
     
  9. Invent4

    Invent4

    Joined:
    Aug 20, 2012
    Posts:
    14
    Hello,

    It would be nice if Ludosity tell us about their intentions on continue supporting this plugin.

    It's being hard to have any kind of answer or support from them since the past month, or more.

    If they don't want to continue supporting it, I would recomend to stop selling the asset then.
     
  10. JayPA52

    JayPA52

    Joined:
    Apr 2, 2014
    Posts:
    2
    Just bought this and wondering if it was a mistake. It's not a very good sign when the sample code won't even compile. Especially considering how little there is of it. Sparty, I just put a .AsUInt64 after the mismatched IDs in order to get it to compile. No idea if that's good enough.
     
  11. JayPA52

    JayPA52

    Joined:
    Apr 2, 2014
    Posts:
    2
    I'm getting NoAuth from UserHasLicenseForApp as well. I've confirmed the App ID is correct. SteamID also looks correct (At least it's a big number and not zero.) Pretty much dead in the water if steam thinks I don't own the app. I also have some idea that my AppID is good because I've already pushed a build and launched it from steam.

    This seems like such a basic thing, I wonder if there's something going on at Steam, Then again Knil has been waiting 2 days on the same problem and the sample didn't even compile.

    Tomorrow morning, I'll be off to something else I guess. Does Asset Store do refunds?
     
  12. Knil

    Knil

    Joined:
    Nov 13, 2013
    Posts:
    49
    I'm using
    SteamInterface.Apps.IsSubscribedApp(SteamInterface.AppID);

    Now to check whether they own the game now since I was getting no auth the other way. Just be sure to note this is just a client side check so it isn't 100% secure.
     
  13. immFX

    immFX

    Joined:
    Mar 20, 2010
    Posts:
    109
    Does anyone know if this works with Unity 3.5.x?
    I need to know this before I buy.
     
  14. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,727
  15. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Update your plugin. It gives me compile errors on latest Unity pro.
     
  16. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    Hi!

    I'm trying to use the IsSubscribedApp method as mentioned by Knil to tell if a player bought our DLC or not, but I get an EntryPointNotFoundException and don't really understand what am I doing wrong.

    I have a static class for the SteamAPI call handling:

    Code (CSharp):
    1. public class SteamAPI : MonoBehaviour
    2. {
    3.     static SteamAPI o_instance;
    4.     Steam SteamInterface { get; set; }
    5.     public bool b_init = false;
    6.  
    7.     public static bool Initialize()
    8.     {
    9.         (...)
    10.  
    11.         o_instance.b_init = true;
    12.     }
    13.  
    14. (...)
    15.  
    16.     public static bool IsDLCUnlocked()
    17.     {
    18.         bool b_result = false;
    19.  
    20.         if(o_instance.b_init)
    21.             b_result = o_instance.SteamInterface.Apps.IsSubscribedApp( new AppID( 123456 ) );
    22.         else
    23.             Debug.LogWarning("SteamAPI: failed to check app subscription, SteamAPI is not initialized.");
    24.  
    25.         return b_result;
    26.     }
    27. }
    The error is:
    EntryPointNotFoundException: Apps_IsSubscribedApp
    ManagedSteam.Implementations.Apps.IsSubscribedApp (AppID appID)

    Every help welcome!
     
  17. Knil

    Knil

    Joined:
    Nov 13, 2013
    Posts:
    49
    Check out the example code Steamworks.cs and the awake function you should only need to call:

    SteamInterface.Apps.IsSubscribedApp(SteamInterface.AppID);

    You don't need to get an instance of your class.
     
  18. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    Thanks for the quick answer!

    The whole script is made static before by a previous programmer, so the instance is needed. Achievement handling is working okay so it shouldn't be a problem. Or do this particular function work in a different way and there is no way it would work with a static call?

    And if I call it with SteamInterface.AppID it would mean the app ID of the current app, not the one I want to check for, wouldn't it?
     
  19. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    we just grabbed it for a project, but I can't even figure out where to start.

    this is definitely not a 'one step' integration by any stretch.

    documentation is terrible, almost worse than not having docs at all.

    For those that have it working - do I really need to make 3 copies of my project with separate DLL's for this package to work?

    There are so called 'startup projects' for mac / linux / windows that appear (to me) to be bare bones sample unity projects to get started with, but there is no documentation about what to do with them or any explanation how they are to be used, etc.

    very disappointed at this stage.
     
  20. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    @Sparty - I fixed those compile errors by doing this:

    if (value.GameID.AsUInt64 == Steamworks.SteamInterface.AppID.AsUInt64)

    In both cases, but to be honest I have no idea if this will actually work because I don't even know how to test the game or figure out what else I'm supposed to be doing. If I figure anything out, might post it up just so I can remember later.
     
  21. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    can anyone tell me what I'm supposed to put for the AppID? I can't even figure out the first most basic step. This is ridiculous. Is it possible to test the game from the Unity editor or do I have to make a build to test if it's working?
     
    TooManySugar likes this.
  22. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    Ok think i'm slowly making progress.

    Had to add this to the 'Steamworks.cs' file at the start of the OnGUI() function:

    private void OnGUI()
    {
    if( SteamInterface == null)
    return;

    because it was just blowing up because Steamworks hadn't been initialized yet.

    ugh.
     
    TooManySugar likes this.
  23. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    gekidoslair:
    You don't have to make three projects, just import the plugin to your project.
    AppID comes from steam, if you create your app there, you'll be given an appID.
    You can test from the editor, just make sure that the steam app is running.
     
  24. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    Now about my problem: If I call some function of SteamInterface.Cloud or SteamInterface.Stats, it works, but any call from SteamInterface.Apps gives me the same EntryPointNotFoundException. What can be wrong?
     
  25. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    Ok, this is getting even more strange. It works on my college's PC, but not on my iMac. What's causing this?
     
  26. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    Thanx LionTR - think I have it figured out. sure would have been nice to have some better docs from Ludosity.
     
    TooManySugar likes this.
  27. LionTR

    LionTR

    Joined:
    Mar 26, 2010
    Posts:
    33
    Their philosophy is to not have any docs because all the functions are described in the steam docs (or not...) and they only use those... Still some more usage examples would be helpful.
     
  28. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Fix this!
     
  29. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    Fix it!! For me is an absurd to pay so much for a plugin and it comes with compile errors. This is incredible.
     
  30. Rob-Fireproof

    Rob-Fireproof

    Joined:
    Dec 18, 2012
    Posts:
    18
    Hi all,

    I got a bit sick of the process of building, applying DRM and uploading builds, so I wrote an editor window to help.

    Use at your own risk - I won't be supporting it at all, and take no responsibility if it deletes your C drive. (Seriously though - it will do a recursive delete of whatever you tell it is your content folder and build path, so be a bit careful).

    Script is attached, just dump it in an editor folder and it should appear in your Windows menu. Fill in all the blanks (they get cached in EditorPrefs), see the attached image for how mine's set up.

    SteamUtils.png

    If anyone from Ludosity wants to clean it up and include it with the wrapper, you're more than welcome!

    Hope it's useful to someone.
     

    Attached Files:

    TooManySugar likes this.
  31. liverolA

    liverolA

    Joined:
    Feb 10, 2009
    Posts:
    347
    yes,we need the update please!!!
     
  32. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    235
    I have the same problem. An update might be good.
     
  33. Basileus

    Basileus

    Joined:
    Jan 29, 2013
    Posts:
    1
    Hi,

    Did anyone try to create a GameServer on his game?

    We never received the SteamServersConnection callbacks after calling the IGameServer.LogOnAnonymous(). Also, ServicesGameServer.Initialize() returns true in editor and an exception (ManagedSteam.Exceptions.SteamInitializeFailedException: SteamInitializeFailed) on standalone builds.
    (FYI, lobby callbacks are correctly fired in editor and standalone build)

    I would like to know if the GameServer feature works in editor, if I have to test on standalone build or if I have to upload my build to test through the Steam client.

    Any help would be welcome,
    Thanks in advance.
     
    Last edited: Jun 24, 2014
  34. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    95
    Just an FYI, there is an open-source Steamworks library that is actually being supported and worked on regularly. From what I can see on the Steam forum, this seems to be the main integration library that alot of people are migrating to.

    Don't mean to dis Ludosity's system, but an open-source community-supported library wins for me, even after spending the money on the Ludosity library.

    Migration is fairly easy, depending on how much work you've already done:

    Core Library:
    https://github.com/rlabrecque/Steamworks.NET

    Example project:
    https://github.com/rlabrecque/Steamworks.NET-Example

    CSteamworks ABI wrapper that the core library uses (not required if you are just using the library, but good to know that the source is available):
    https://github.com/rlabrecque/CSteamworks

    Haven't had any issues with integration myself, and it 'just works' so far.

    Hope this helps someone.
     
  35. CoolBeat

    CoolBeat

    Joined:
    Aug 22, 2014
    Posts:
    1
    Hi guys, i have a problem using the wrapper on the Macbook, the game works fine in the Unity editor with the steam wrapper, but when I test out on the standalone builds, it can't seem to find the DLL files, "SteamAPIWrap". I've checked, but the file is there, so I'm not sure how to proceed here on.
     
  36. Majicpanda

    Majicpanda

    Joined:
    Dec 23, 2012
    Posts:
    12
    I've gotten this working 100% on PC and released to a dev test but trying to build to OSX or using it on my MacBook with OSX isn't working either. Followed the PDF exactly for file structure and copied over the right libsteam_api.dylib to the project and still getting DllNotFoundException: SteamworksNative
     
    JohnnyWasabi and CoolBeat like this.
  37. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    What has happened with this product. The earlier posts indicate it cost $300, but now it is free on the Asset store. Is the developer still supporting this package?
     
    TooManySugar likes this.
  38. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,795
    It's gone free. I don't think so. In this case, better use rlabrecque's Steamworks.NET mentioned above.
     
    Zaddo67 likes this.
  39. sloankelly

    sloankelly

    Joined:
    Jul 6, 2012
    Posts:
    9
    Did you ever get a fix for this? I'm running into the same problem.
     
  40. junglemason

    junglemason

    Joined:
    Dec 30, 2010
    Posts:
    70
    Same problem. Did you ever work this out?
     
  41. sloankelly

    sloankelly

    Joined:
    Jul 6, 2012
    Posts:
    9
    I took the plunge and converted my game to work with this library, but I'm getting strange out-of-memory errors when I quit the game now. They were not there before changing over to steamworks.net.

    Edit: The error I'm getting is this:

    Fatal error!
    CheckDisalowAllocation. allocating memory when it is not allowed to allocate memory.​
     
    Last edited: Nov 20, 2014
  42. Kos-Dvornik

    Kos-Dvornik

    Joined:
    Jan 3, 2012
    Posts:
    224
    We have such problem in Anoxemia, but we fixed it. If anyone is interesting I can make a video tutorial.
     
    TooManySugar likes this.
  43. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Sounds like a great idea!
     
  44. JohnnyWasabi

    JohnnyWasabi

    Joined:
    Jul 16, 2012
    Posts:
    43
    How did you resolve this? I'm having the same problem/error on Mac build.
     
  45. JohnnyWasabi

    JohnnyWasabi

    Joined:
    Jul 16, 2012
    Posts:
    43
    I would love to see your solution. I'm having the same problem with DllNotFoundException: SteamworksNative on Mac build.
     
  46. Kos-Dvornik

    Kos-Dvornik

    Joined:
    Jan 3, 2012
    Posts:
    224
    Here it is:
     
    TooManySugar, Zaddo67 and OnePxl like this.
  47. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
  48. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    Thanks!
     
  49. JohnnyWasabi

    JohnnyWasabi

    Joined:
    Jul 16, 2012
    Posts:
    43
    JFYI: I switched to the Steamworks.NET wrapper and it worked first try on all three platforms (Windows/OSX/Linux).
     
  50. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Somebody does uses Steam Auto-Cloud?

    How to make it use the LocalLow folder in Windows?
     
unityunity