Search Unity

No overlay with SteamInventory.StartPurchase()

Discussion in 'Scripting' started by crandellbr, Aug 11, 2022.

  1. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    Hi, folks. I'm trying to add microtransactions to an already published game using Steam Inventory Service. Item Definitions have been uploaded to Steamworks, and I'm able to retrieve pricing info on available microtransactions. The problem is that when I try to call SteamInventory.StartPurchase(), the Steam overlay simply doesn't show. There are no errors, and the overlay appears normally when pressing Shift+Tab.

    This is my last stop before searching for a freelancer. I've seen the question asked before, but no reports of a solution. The combination of no errors and no useful documentation puts this outside of my capacity to solve, short of banging my head against the wall and hoping I get lucky. (And there's been some of that already.)

    Has anyone seen this problem and actually managed to solve it?
     
    Petr777 likes this.
  2. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    I seem to have fixed it, with the help of a Steam forum member and this Unreal video. It appears the error was not setting the Asset Server Key in Steamworks Settings > Community > Economy.
     
  3. homoinanis

    homoinanis

    Joined:
    Sep 29, 2020
    Posts:
    7
    The Steam documentation is really good, but there are some points that don't link quite right.

    When you need to perform an asynchronous operation that has to communicate with the Steam API INTERNALLY use Steam's "CallResult".
    However, when you need to perform an operation that requires the connection with an external element (such as the overlay to authorize a transaction) you have to use the "Callback".

    Here you can see how both work: https://steamworks.github.io/gettingstarted/