/// <summary> /// <para>Grants the user all available promotional items</para> /// <para>This will trigger the Item Instances Updated event after steam responds with the users inventory items and the items have been updated to reflect the correct instances.</para> /// <para> <para> /// <para>NOTE: this additivly updates the Instance list for effected items and is not a clean refresh! /// Consider a call to Refresh Inventory to resolve a complete and accurate refresh of all player items.</para> /// </summary> public void GrantAllPromotionalItems() { var result = SteamworksPlayerInventory.GrantPromoItems((status, results) => { ItemsGranted.Invoke(status, results); }); if (!result) { Debug.LogWarning("[SteamworksInventorySettings.GrantAllPromotionalItems] - Call failed"); } }
/// <summary> /// Grant promotion items and print the results to the console. /// </summary> public void grantPromoTest() { if (SteamworksPlayerInventory.GrantPromoItems((status, results) => { if (status) { Debug.Log("Granted " + results.Length + " promo items."); } else { Debug.Log("Grant Promo Items Failed."); } })) { Debug.Log("Grant Promo Items request sent to Steam."); } else { Debug.Log("Grant Promo Items failed to send to Steam."); } }