Okay I am trying To access the children of a gameobject and look in a Component to get a variable. That works fine. But I want to change the variable thats in the child object.
Here is the Code. By the way Item.itemId and Item.amount are variables in a class. They are both ints.
for (var child : Transform in transform)
{
if(child.GetComponent(InventoryObject).Item.itemId == 1002)
{
child.GetComponent(InventoryObject).Item.amount == 20;
}
}
And then I get the error code BCE0034. Anyone got any ideas?