Hey, so I’m making an inventory and I need to check if the image source in the image component is “Blank_Icon” which is an actual sprite. So I added the Blank_Icon sprite to the Resources and the code goes like this:
public void AddItemToInventory(string itemName)
{
for (int i = 0; i < 2; i++) {
if (invIcons*.GetComponent<Image>() == Resources.Load("Blank_Icon")) {*
print(“Found an empty space!”);
break;
}
}
}
This doesn’t work thought so how could I make it work? Thanks!