It looks like you're new here. If you want to get involved, click one of these buttons!
I have two scenes a menu and the actual game. I have a game object called Background and I made it a prefab to use it in both scenes. I've put a script on Background which changes the sprite used for the background with a Sprite Renderer.
In the menu it works properly, but in the game scene I have a problem: I'm using game states and at void Start I change the game state to generating a grid.
Here's the grid generating script (boardPrefab is a Sprite Renderer):
And for some reason I just can't figure out why, sometimes the grid doesn't appear. With the first/default background it always works but if I change the background for some it doesn't show and it's random which ones. One time it worked perfectly all of a sudden without any change to any of the scripts but then it went back to being bad. Even if I build the game its bad for some themes. Please help, I need this for a school project and I just don't know why it's not working.
Some of you might recognise the script, yes yes it's not original work (at least the game manager script).