-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InventoryTester.cs
33 lines (30 loc) · 1.05 KB
/
InventoryTester.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Sirenix.OdinInspector;
using Steamworks;
public class InventoryTester : MonoBehaviour {
[Title("Inventory Tester")]
[InfoBox("Generate and Remove Items on your Steam Inventory.")]
public int itemID = 100;
public int itemAmount = 1;
[Button("Generate Item")]
[ButtonGroup("Inventory", 0.5f)]
public void GenerateItemAsync() {
var itemDef = SteamInventory.FindDefinition(itemID);
var inventoryResult = SteamInventory
.GenerateItemAsync(itemDef, itemAmount)
.Result;
Debug.Log($"{itemAmount} of {itemID} has been generated.");
}
[Button("Remove Item")]
[ButtonGroup("Inventory", 0.5f)]
public void ItemRemove() {
// Debug.Log($"{itemAmount} of {itemID} has been removed from the inventory.");
Debug.Log($"Currently not Supported.");
}
}