Search Unity

Steam Workshop - Easy Steamworks Integration

Discussion in 'Assets and Asset Store' started by FreebordMAD, Mar 22, 2017.

  1. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
    Hi,

    I need some help please.
    I got everything to work but for some reason I can only see the image, title and description of my own uploads.
    If someone else uploads stuff to the workshop it shows correctly in the browser but in my game it is missing all information.

    Any idea how to fix this?
     

    Attached Files:

  2. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Sounds like SteamLeaderboardsMain.ScoreDownloadSource is set to EWorkshopSource.OWNED. You can check this in the Unity inspector.
     
  3. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
    Thank you for your respond!

    Where can I find this?
    I looked through all scripts and objects I could find, SteamLeaderboardsMain does not excist.
    It is also not mentioned as reference to the EWorkshopSource enum.
     
  4. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Sorry I mixed up the packages.

    Check for the SteamWorkshopMain class. The SteamWorkshopMain.Sorting property is what you need.
    You can set it on runtime via SteamWorkshopMain.Instance.Sorting = new WorkshopSortMode(EWorkshopSource.PUBLIC);
    Alternatively, try choosing something in the sort by drop down.

    Also double check the settings you made in UGC setup on Steam and compare with the below.
    Link App And Setup Workshop
    Follow the steps below to set the AppId and to configure Steam Workshop for your game.
    • Start one of the test scenes to generate the steam_appid.txt file in the root of your project (the folder where Assets, Library and ProjectSettings directories a located).
    • Open the steam_appid.txt file and replace 480 with your Steam AppId.
    • Restart Unity Editor to load your new AppId.
    • Login to partner.steamgames.com and open your game's App Admin page.
    • Under Technical Tools hit Edit Steamworks Settings.
    • Go to Application->Steam Cloud and set your data quotas e.g. 1048576000 for data per user and 1000 for number of files.
    • [optional] Tick Enable cloud support for developers only to hide your Workshop work until it is finished for public use.
    • Go to Workshop->General and tick Enable ISteamUGC for file transfer.
    • Go to Publish and apply your changes.
    • Steam might need a few hours for the changes to be applied -> be patient if it doesn't start to work instantly.
    • Now you should be able to browse the items of your game's Workshop and to upload new items by using the provided example scenes (in the ExampleScenesPopup or ExampleScenesStatic folders). You can find a more detailed tutorial in the Steam partner portal.
     
  5. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
    All of it is correct...
    The two workshopitems with no image are from another player, I can see and download them but there is no img, title or description. I know there is one because in the browser I can see all of it.
    The one that says "Test" is one I made, my own workshop creations work no problem.

    If I enable the Debug Log I get this:

    LapinerTools.Steam.UI.SteamWorkshopItemNode+SendMessageInitData
    QueryFavoritedItems page 1
    OnFavoriteItemsCallCompleted: (fail:False) k_EResultOK requests left: 0
    QueryVotedItems page 1
    OnVotedItemsCallCompleted: (fail:False) k_EResultOK requests left: 0
    OnVotedItemsCallCompleted - started vote requests: 2
    OnUserVoteCallCompleted: (fail:False) k_EResultOK requests left: 1
    OnUserVoteCallCompleted: (fail:False) k_EResultOK requests left: 0
    QueryAllItems from PUBLIC page 1
    OnAvailableItemsCallCompleted: (fail:False) k_EResultOK requests left: 0
    SteamWorkshopMain: ClearSingleShotEventHandler 'OnItemListLoaded' left handlers: 1/2 left single shots: 0/1
    OnAvailableItemsCallCompleted: loaded 3 items from page 1, 1 favorited by user, 2 voted by user

    Unbenannt.PNG Unbenannt2.PNG Unbenannt3.PNG
     
  6. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Can you please send me the browser links to your workshop items? I could then try myself.
     
  7. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
  8. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I unfortunately cannot load your workshop at all.
    https://steamcommunity.com/app/1113240 - doesn't show the workshop.
    Can you make some screenshots of your workshop setup?

    The only thing I can imagine is that you have issues to share the level icons, because of some user rights.
    How did you enable the workshop for the other players that have uploaded the content?

    [EDIT:] I have updated to Steamworks.NET 13, but also there I cannot open your workshop at all. I'm not sure if you other players are listed as developers and can access the workshop this way or if you have any other way to include players to the workshop. If there is a good way, then feel free to add my pubisher account to your beta (https://steamcommunity.com/profiles/76561198238259518).
     
    Last edited: Dec 17, 2019
  9. payalzariya07

    payalzariya07

    Joined:
    Oct 5, 2018
    Posts:
    85
    hi
    I am trying to login in to steam using steamNetworks.NET 480 appid, but issues are when I am login in unity editor , it work fine. when I make exe build and run it showing error like below :
    [Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.
     
  10. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi, have you copied the AppID text file to the same place where the exe is?
    Also, closing the editor after the build might help.
     
  11. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
    I screenshotted everything I think could be important. I did not now that someone else can't access the workshop and I have no idea why. :-/
     

    Attached Files:

  12. payalzariya07

    payalzariya07

    Joined:
    Oct 5, 2018
    Posts:
    85


    Thank you so much it works.
     
    FreebordMAD likes this.
  13. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    In your screenshots it looks like you have not entered the general Workshop text and screenshot data, I don't think that you can publish it like this.

    I have set the 'developers only' tick to test without setting the real Workshop content data.
    upload_2019-12-22_20-13-3.png

    Have you tried to publish your changes in the most right publish tab?
    upload_2019-12-22_20-9-59.png
     
  14. GamingPugsStudios

    GamingPugsStudios

    Joined:
    Sep 26, 2019
    Posts:
    7
    It worked! After I entered a title and description there was a way to select who can see the content. I added the description to a wrong place before. Thank you soooo much for your help!!!
     
    FreebordMAD likes this.
  15. moxemk

    moxemk

    Joined:
    Nov 27, 2016
    Posts:
    2
    Can you help if i use IL2CPP build its doesnt work. In MONO, everything is fine(and Managed code stripping must be off)
     

    Attached Files:

    Last edited: Jan 26, 2020
  16. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I'm sorry to say, but it looks like Steamworks.NET doesn't support IL2CPP yet. See this github thread:
    https://github.com/rlabrecque/Steamworks.NET/issues/227

    You could follow the instructions in the thread and recompile Steamwork.NET, but this is rather a complex thing to do.
    Do you require IL2CPP to be used?
     
    XCO likes this.
  17. XCO

    XCO

    Joined:
    Nov 17, 2012
    Posts:
    380
    Hey my man may I ask some questions ?

    - Does this work with unity 2017.4 ?
    - Does this have playmaker support ?
    - Does let you sell extra items like DLC ?
    - Would this be difficult for a non programmer to use ?

    Is this all I need to get my game up and running as far as Steam goes ? Thank you very much.
     
  18. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi there, see answers below.
    • Q: Does this work with unity 2017.4 ?
    • A: yes

    • Q: Does this have playmaker support ?
    • A: unfortunately no

    • Q: Does let you sell extra items like DLC ?
    • A: it has not financial handling

    • Q: Would this be difficult for a non programmer to use ?
    • A: currently there is no PlayMaker integration or pure inspector setup. Basic coding skills are required to use it
    It doesn't sound like the ESI plugins would fit to your needs, the Steam framework is quite complex and very coding intensive. The ESI plugins reduce the coding skills required to just basics, but do not make it yet possible to work without coding. If you want, then just give it a try and request a refund within 10 days (I need to forward refund to Unity within 10 days).
     
    XCO likes this.
  19. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello- I've got uploading and downloading working using your asset-




    But if I click the thumbs up or down buttons I get this error

    Code (CSharp):
    1. OnVoteCallCompleted: failed! Internal error!
    2. UnityEngine.Debug:LogError(Object)
    3. LapinerTools.Steam.SteamMainBase`1:HandleError(String, ErrorEventArgs) (at Assets/LapinerTools/Steam/Shared/Scripts/SteamMainBase.cs:177)
    4. LapinerTools.Steam.SteamMainBase`1:CheckAndLogResult(String, EResult, Boolean, String, Action`1&) (at Assets/LapinerTools/Steam/Shared/Scripts/SteamMainBase.cs:161)
    5. LapinerTools.Steam.SteamWorkshopMain:OnVoteCallCompleted(SetUserItemVoteResult_t, Boolean) (at Assets/LapinerTools/Steam/Workshop/Scripts/SteamWorkshopMain.cs:1020)
    6. Steamworks.CallResult`1:OnRunCallResult(IntPtr, IntPtr, Boolean, UInt64) (at Assets/Plugins/Steamworks.NET/CallbackDispatcher.cs:318)
    7. Steamworks.NativeMethods:SteamAPI_RunCallbacks()
    8. Steamworks.SteamAPI:RunCallbacks() (at Assets/Plugins/Steamworks.NET/Steam.cs:97)
    9. SteamManager:Update() (at Assets/Scripts/Steamworks.NET/SteamManager.cs:158)
     
    Last edited: Jul 13, 2020
  20. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Pretty quiet here 0_0 Just decided to remove the thumbs up/down buttons because of the error-
     
  21. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Sorry for the late reply, do you still struggle to get the voting work for your game. Can you tell me your Steam AppID and the Unity version you use? Also, do you have a different Steamworks.NET version installed compared to the one installed with the plugin? A full editor log could also help.

    General Announcement
    Hi everybody, I'm sorry to say but in the current worldwide and my private situation I struggle to find time to provide support. None of my projects is discontinued and I will upgrade all of my projects to the newest Unity version. I assume that the support issue will continue till around Christmas, then it pretty much depends on corona or kindergartens being open/closed. I'm very sorry for the inconvenience this causes at the moment.
     
    Ony likes this.
  22. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello- sorry to hear about your troubles.

    Steam app id is 1355310
    Unity version is 2017.4.32.f1
    I'm using the newest Steamworks version, so yes its newer than the one that ships with the asset

    When I get a chance I'll re-enable the thumbs and send you a editor log-

    Is there any way to easily add a "sort by tag" function to the Workshop Browser window/scripts?

    Everything works really well- thank you for this asset btw.

    Thanks for your time.
     
  23. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    [SOLVED]

    Also I'm using your "popup_steam_ugc_browse_root" prefab to download from Workshop- works great!

    Is there a way to use it to query/search by item tags?

    All of my items are tagged by category and I'd like to make it to the user can press a button for the tag and it will only show items that have that tag.

    Thank you for your time.

    [EDIT]

    I found your browse with tags example and was able to make it work. Thanks!
     
    Last edited: Aug 11, 2020
  24. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Your game is not released yet. This actually might already be the issue.
    I cannot retrieve any Workshop Data from it, because of that.
    Can you please try to download the Workshop ESI plugin into an empty project, set the AppID and check if it then works with voting or not? Then we will know if it is due to a different Steamworks.NET version or due to the fact that it is not yet released.

    Another thing to try would be voting over the Webpage or Steam Client, I'm not allowed to vote, might depend on the fact that I don't own it, but could also depend on your configuration not allowing votes prior to lunch.
    upload_2020-8-19_21-7-43.png

    I'm very glad to hear that my examples were helpful :)
     
  25. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    Hi! Can you tell me how to upload a level created with MRLE to steamworks?
     
  26. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Please check the script MRLE_SteamWorkshop_ESI_Example, which is commented out in LapinerTools\LevelEditor_FileSelection\Integration\. Also attached here in case you don't own the file handling extension.

    So basically you need to do three steps
    * save files in a folder structure (Steam Workshop saves/loads folders, not files)
    * you upload the root folder of your level via the WorkshopItemUpdate class of the ESI plugin
    * you scan the Steam Workshop folder to find level folders, which the player can load

    Revert with any detailed questions you might have.
     

    Attached Files:

    Ony likes this.
  27. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    Hi! thaks for the info i will try it. ;)
     
    FreebordMAD likes this.
  28. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    Hi! I have another doubt. What should I to do update an updated level? is there a button on the prefab "steam workshop browser"? thks!
     
  29. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi Juaprebo, very valid question. Luckily Steam handles this on startup of the game. So if you have a mod/item/level subscribed, then Steam will check if it is up to date before the game is even started. There are tricks, which users can do, to prevent this from happening, but those are usually advanced enough to also update manually without you doing anything when they want. See e.g. this Steam Forum Thread.
     
  30. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    OK. Thks.
    And another question, the plugin allows me to delete an uploaded level?
     
  31. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    This functionality is not supported. I assume that you will not delete any of your own uploaded items frequently. If you do want to delete your own level, then I assume that you would rather go to the Steam overlay or the Workshop web page - you would check comments and ratings before you remove your work. What is your use case?
     
  32. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    Hi! If steamworks alows users to delete the level is fine for me (I'm in testing app nowadays) By the other hand I trying to find the manner to select a subpart of a prefab to edit it (ie. Select a wheel on a car or whatever). How i can do it? Thanks
     
  33. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Could you explain the use case a little better please?

    What might helps is the doc under Variations properties of the 'LE_Object'.
    http://www.freebord-game.com/index....vel-objects#le_obj_inspector_variations_v1_30

    You could for example define different types of wheels and then allow the player to select them via the variations menu in the ACTIVE_DEACTIVATE_OBJECTS mode. Alternative would be to just exchange the material of the wheels via the REPLACE_MATERIALS mode.
     
  34. Juaprebo

    Juaprebo

    Joined:
    Nov 15, 2014
    Posts:
    19
    Hi! wheels are only an example. What i want is chage the transforms for nested objects. In this case variations don't solve my problem. For now, I did a modification on code to save nested transforms. But if exists an implementation I would to use it.
     
  35. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Currently MRLE, doesn't support nested transforms. What you can do though is save them in the level meta data, see doc:
    http://www.freebord-game.com/index....time-level-editor/documentation/add-meta-data

    P.S.: we should change the forum thread to the one below, if you want to get MRLE support ;)
    https://forum.unity.com/threads/multiplatform-runtime-level-editor.250920/
     
  36. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    I have just submitted the newest update, here is the changelog.
    Let me know if something doesn't work as expected.

    v1.25
    - updated to Steamworks.NET 20.1.0
    - updated Unity base version to 2019.4.20f (newest Unity releases are also supported)
    - added support for IL2CPP builds
    - added GetAppsWorkshopRootFolderPath to SteamWorkshopMain
    - added GetItemListForAllPages to SteamWorkshopMain
    - added SteamWorkshopGetItemListForAllPages to SteamWorkshopMain
    - added SteamWorkshopMain.Download method to allow downloading without subscribing
    - improved debug logging
    - added more examples scenes
     
  37. CoolCat518

    CoolCat518

    Joined:
    Feb 4, 2015
    Posts:
    18
    Hi bro,
    I have purchase this plugin.
    And I have downloaded workshop items,if I need to read the downloaded item and generate it in unity, what to do?
     
  38. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Hi there,
    as you might have figured out already, the folder an item is downloaded to can be fetched via
    WorkshopItem.InstalledLocalFolder

    For example, see code in the SteamWorkshopBrowseExampleStatic class
    Code (CSharp):
    1.         // implement your item/level loading here
    2.         SteamWorkshopUIBrowse.Instance.OnPlayButtonClick += (WorkshopItemEventArgs p_itemArgs) =>
    3.         {
    4.             // collect names of all local files
    5.             string filesInfoStr = "\n";
    6.             try
    7.             {
    8.                 string[] localFiles = Directory.GetFiles(p_itemArgs.Item.InstalledLocalFolder);
    9.                 for (int i = 0; i < localFiles.Length; i++)
    10.                 {
    11.                     filesInfoStr += localFiles[i] + "\n";
    12.                 }
    13.             }
    14.             catch
    15.             {
    16.                 filesInfoStr += "not found!";
    17.             }
    18.  
    19.             // put all together in one string and show a popup
    20.             string itemDataStr =
    21.                 // item name
    22.                 "Name: " + p_itemArgs.Item.Name + "\n" +
    23.                 // steam PublishedFileId
    24.                 "Published File Id: " + p_itemArgs.Item.SteamNative.m_nPublishedFileId + "\n" +
    25.                 // folder containing level data on user's hard driver
    26.                 "Local Folder: " + p_itemArgs.Item.InstalledLocalFolder + "\n" + filesInfoStr;
    27.  
    28.             ((uMyGUI_PopupText)uMyGUI_PopupManager.Instance.ShowPopup(uMyGUI_PopupManager.POPUP_TEXT))
    29.                 .SetText("Item Played", "Load your Steam Workshop item here (e.g. could be a new level for your game)\n" + itemDataStr)
    30.                 .ShowButton(uMyGUI_PopupManager.BTN_OK);
    31.         };
    What kind of content have you uploaded?
    There are various things you could load
    • read a text file: https://gamedev.stackexchange.com/a/85813
    • read image file: see LoadIcon method in SteamWorkshopUIUpload class
      Code (CSharp):
      1. WWW Image = new WWW("file:///" + p_filePath);
      2. yield return Image;
      3. if (Image != null)
      4. {
      5.     if (Image.isDone && string.IsNullOrEmpty(Image.error))
      6.     {
      7.         Texture2D texture = Image .texture;
      8.         ...
      9.     }
      10. }
    • read a 3D object: Runtime OBJ Importer
     
  39. CoolCat518

    CoolCat518

    Joined:
    Feb 4, 2015
    Posts:
    18
    Thank you for your answer!
    I'm actually not a programmer, so I'm sorry I can't read the script.
    I'm using unity visual scripting, is there any advice on how to get the workshop item I already downloaded?
     
  40. CoolCat518

    CoolCat518

    Joined:
    Feb 4, 2015
    Posts:
    18
    My workshop item is an asset bundle file from unity build, now I just need to know if I can get the path of the folder corresponding to each downloaded item, but I don't know how to get this path
     
  41. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Can you please make some screenshots of the visual code you did to download the items?
     
  42. CoolCat518

    CoolCat518

    Joined:
    Feb 4, 2015
    Posts:
    18
    Thank you for your reply!
    Never mind, I used a very dumb way to get the path address of the steam workshop items now.
    It would be nice if the path address of the item could be exposed to an object after clicking play... But it doesn't matter, I've solved it.
     
  43. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Glad to hear it works for you!
     
  44. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    Greetings. First off, your plugin is awesome. It saved a bunch of time. We have uploading, downloading, and everything working. The last thing is submitting new / updates with tags. We use Tag Categories (EX: Avatars:VRoid VRM)

    Do you have an example on how to format this properly in the XML? I'm not seeing these tags applied in the workshop.
     
  45. Rave-TZ

    Rave-TZ

    Joined:
    Jul 21, 2013
    Posts:
    77
    Any idea when this will be available on the Unity Asset Store? Its still reporting v1.24
     
    Ony likes this.
  46. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Check for the SteamWorkshopTagsExample scene and script.
    You simply add the tags to WorkshopItemUpdate.Tags.
    Let me know if you need any further info on that.

    Unfortunately, it seems I need new icons and a new plugin name as it is not in line with the new guidelines to use Steam in there - I didn't yet find the time to update those. Will send you v1.25 in a PM.
     
    Ony likes this.
  47. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Could I get this also? I can send you my invoice# if needed. Thanks!
     
  48. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Very sorry for the far too late reply, please just send me a pm with your e-mail address
     
    Ony likes this.
  49. GamePyro-com

    GamePyro-com

    Joined:
    Jul 28, 2018
    Posts:
    197
    Can you send me newest version of your steam-workshop-easy-steamworks-integration plugin because read in forum the newest not in unity store .

    can you send link where to download because also at popup the icons only white :/


    In editor all works but not in at build why?

    Code (CSharp):
    1. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/CSteamworks
    2. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/CSteamworks.dll
    3. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/CSteamworks
    4. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/libCSteamworks
    5. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/libCSteamworks.dll
    6. Fallback handler could not load library E:/Program Files (x86)/Steam/steamapps/common/Data/Mono/libCSteamworks
    7. [Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It's likely not in the correct location. Refer to the README for more details.
    then the game crashes when clicked to open Steam Workshop Popup


    In editor it works.
     
  50. FreebordMAD

    FreebordMAD

    Joined:
    Mar 15, 2013
    Posts:
    633
    Check if the DLLs got copied and check my PM for the updated version