Hover over highlighted countries to verify sprite changes
Click ‘Show Global Coverage’
Hover over highlighted countries to see sprite assets not being loaded on or after hover
Click ‘Hide Global Coverage’
Hover over highlighted countries to see previous sprite assets not being loaded on or after hover
Click ‘Show Global Coverage’
Hover over highlighted countries to see sprite assets are now being loaded and working as expected
Click ‘Hide Global Coverage’
Hover over highlighted countries to see sprite assets are now being loaded and working as expected
It certainly seems like it’s related to the button component, but I’m not sue how to address this.
Quick note:
You will notice that I only change the button status sprites on one of the click events. For some bizarre reason, if I add the same code to both directions I get white squares in all cases regardless of how many times I switch sprites.
Thank you for taking an interest in the community. It’s always appreciated to see new faces. This thread is for troubleshooting an issue I’m having with a project. If you are looking to connect with others, you might want to try the Random Chat section of the forum:
Sorry for intruding on your vacation! Thank you so much for looking into this. It works now!
The end goal is to switch between the red and gray versions of the sprite. Taking a second look at your code, I see that for the updates to the button component only go to this.countrySprites.dSprite instead of this.countrySprites.dSprite.resource
Is there a reason I need to go to the resource for the elementComponent, but not for the buttonComponent?