Hello, I've just added a new feature to my inventory system, just like in RTS games, if you hold the item with the mouse (pick it up) if you try to place it in a place where it can't fit, I change the color tint of the rect/background that's drawn behind the item texture to red, where if you hover over an area that the item can fit it, I change the color to green indicating that it can fit there.
(attachment no. 1)
Again, I do that by changing the color of the rect:
public void ChangeFitIndicatorColor(bool doesItemFit)
{
// rectTexture is a sliced sprite / has a UISlicedSprite script attached to it
rectTexture.color = (doesItemFit) ? fitColor : doesntFitColor;
}
But sometimes, for no reason, I get some really awkward looking spdiy web-like thing, from the point I click to pick the item, to the cursor, inside that weby thing, I sometimes see some of the textures in my atlas, or the color tint (red|green), really strange. Please look at the 2nd attachment.
Any idea why this is happening and how to prevent it? - Thanks a lot!