Hi!
So, I have started the Laser Defender part of the course. There is this problem when using a different aspect ratio to the one that my computer has:
The camera which I set to 9:16 for example in the unity editor, becomes the 1920*1080 of my screen as soon as I build it into a .exe and try to play the game.
The problems are: My player whom I have clamped to the edges of the 9:16 camera game scene now goes out of that space in the game. (Probably because the ViewPort changes to the wider one as soon as I build the game?)
I temporarily solved this by trial and error increasing the ‘padding’ variable in x axis to bout 13. I have to change it back to 0 or 1 when I start working in the Unity editor again.
Second problem that I just hit: I put the spawn position of my enemy outside the camera range so that they appear from outside. However, in the game that is built, they just appear outside 9:16 area.
I guess, I can put an opaque object like a blank black png on both sides of the scene that covers the sides. But I can’t help but think that I must be doing something fundamentally wrong. Is there a way to build the game with the aspect ratio preserved? Or is it better to just make the game in the computer’s screen aspect all the time?
Thank you in advance for your help. Cheers