Game Development Reference
In-Depth Information
Our inventory works without any errors! Now let's see whether we can add and re-
move items just as easily.
Let's add an item
To test whether we can add items to our inventory, we're going to add a bit of code
to the Update function:
if(Input.GetButtonUp("Fire1"))
{
GameObject test = new GameObject();
test.name = "Sword";
Search WWH ::




Custom Search