Disabling item added to inventory notifications

m633games

New member
Hi,
I wanted to add items to the inventory programmatically. It works well, except how do I disable the notifications that shows up in the bottom left of the screen, for example, "Sword of the Spirit X 1"

The code I used:
GameObject hero = GameObject.Find("Hero");
var m_Inventory = hero.GetComponent<Inventory>();
m_Inventory.AddItem("Sword of the Spirit", 1);

Thanks!
 
The items in the bottom left are displayed by the Inventory Monitor component.

You can disable that component by disabling its gameobject or by using an event.
You'll find code examples that I just added in the docuementation:
 
Top