I've been a bit confused about this for a while now. Say you have a gameobject and a int, and you want that specific game object to be represented as a int id how would you do that?
I'm delving into coding an inventory system. So far I'm going to use a array that has 16 slots. When a player picks up a item which is a gameobject im going to need to id that and put it in the array . But here is the confusion. You cant do gameobject this = int that . So how do you make the gameobject relate to a certain int id? Hopefully someone can clear up this confusion for me. Thanks.
↧