Hello folks,
I’m builing a shmup and my artist made me a background 1280x1024 px. So I created a “Background” gameobject with a Sprite Renderer component and put this background on. But, it doesn’t fill the entire scene.
Now, given that my camera is at Z -5 and my actors are at Z +5, I set the Background to Z +6. Now this is definitely the reason why the background is not filling the scene entirely. But still, 1280x1024 is awfully big for a 2D game. What am I doing wrong?
- Since I don’t know exactly about how Unity’s rendering order works, if I put my background at, say Z 0 but in a lower layer than my actors, am I overdrawing? Putting the background at Z 0 will help me filling the scene, but I don’t feel like it is the correct solution.
- Do I need some coding trick to adapt the background to the resolution the player chooses? If so, could you suggest me an example?
I have already watched Unity’s tutorials on 2D games, but they didn’t help with my problem. :
Thanks in advance.