in my inventory script i have this…
var InBag:GameObject;
var TargetObject:Transform; and this
function Ad(){InBag+=[TargetObject.gameObject];}
Well i already made a script to add object into it…and its all good…i also made a GUI function in an other script to show my items and how many i have…but the things is that i cant assign icon or name or even delete the object from my inventory because once i add it…i cant regain acces to it…CAn somme one help…me just by showing me how i can acces one of the items inside of it…by index…even get acces to the script of one of the game object that is inside…i dont show my other script because it too long and not necessary…SO HELP PLZ !!! its 2 month i try to get a inventory like this and now im on a good way…!!other videos of inventory doesnt do what i can do…so…!!
so what i need:
showing me how i can acces one of the items inside of it…by index…even get acces to the script of one of the game object that is inside
ya right thx u....but...how do we remove one of the item...i tried RemoveAt....but it says that it not part of gameobject...is there a simple way to just remove the object if we have the object index? or i dobt know...
– hotozi