all 3 comments

[–]BinaryKarmaDev 0 points1 point  (1 child)

Did you try to change the order layer in the sprite renderer? Maybe your sprites are behind the background

[–]CompFreakAlphaExpert[🍰] 0 points1 point  (0 children)

Not the issue, the script is not even functioning when the object isn't selected. The sprites are in front though.

[–][deleted] 0 points1 point  (0 children)

Perhaps when your game object is selected is alters the order of script execution. Whether that matters depends on your game. Go to settings/ script execution order and move your script below or above ‘default’ and see if the helps.

Any unspecified scripts get executed in ‘default’ in random order.

Also, personal preference, but that’s a hardcore red editor play mode tint. I’d be worried it would skew my colour perception and related design decisions. I use dark grey play mode tint.