I want to get the instance ID from the name of the item in the player's inventory.
How can I do this?
I want to get the instance ID from the name of the item in the player's inventory.
How can I do this?
According to the question tag you set, your development platform is Unity3D, is it right? If so, you can use the following code to get the corresponding item instance Id according to the item’s display name. For more questions about C# syntax, please check the C#documentations.
private void OnGetSuccess(GetUserInventoryResult result) { foreach (var item in result.Inventory) { if (item.DisplayName == "[Your item display name]") { Debug.Log(item.ItemInstanceId); } } }
2 People are following this question.