I think it’s because the Main Camera is way in the bottom left corner of the screen when the Game Canvas with the score and health text are way at the top.
Ok… I will try to resolve the error…was error free before I tweak stuff. I also tried to build a PC version and the canvas text was way too big and my player ship goes out of boundaries. Was fine in Editor test. I think this is related to score text display out of scene.
Current settings, Editor Maximize on Play screen is fine (both health and score) are displayed. But when I build and run it in web browser, it fails to display the text.
I think I got the anchor points set. I tried to set to Top left for Health and Top Right for Score.
May I know the rational of camera angle so small on a canvas that’s also so small at the bottom left corner of the screen. Isn’t it easier if things are readable in a proper screen resolution of at least 800x600 and system scales up or down as required for a player’s resolution. This way we don’t have text boxes floating at the top like giants.
lol I don’t know the reason to be honest maybe the documentation might help. It’s kind of weird but it works, I’m sure there is a reason maybe to do with scaling and rescaling or efficiency. Personally not so worried about the why and how for some things yet just trying to get better at coding, sometimes knowing that stuff helps for clarity and sometimes it doesn’t
If all works in any case, then it’s fine. But not when it works great only in Editor runtime but could have issues when build to PC or web.
Currently I changed resolution of project screen and canvas to 450x800 (9:16 ratio) and it works on PC build but still not on Web build. Web build still cuts off the top part on my laptop screen. But when I drag the browser window to my external 24-inch monitor, then the whole screen with the health and score displays well. Runtime in Editor is fine.
Your screen is 1080 px high but the resolution settings in Unity make your build 1920 high, which is almost 900 px higher than your screen is able to display. Make sure to use a fitting resolution which matches an aspect ratio of 9:16.
Now I tweaked my PC desktop setting to 100% instead of 125% and the whole canvas with the display text showed. If I returned to 125% setting, then top gets truncated.
But 125% setting isn’t even what’s recommended by my system (was 150% which is too large for my liking). For laptops, such percentage scaling is common. So even though screen resolution may be 1080 or whatever standard sizes may be, if we use standards like 1080, it can get truncated like mine did. So perhaps it’s better to account for these and not have the vertical height set so near the limits? And let the player change the size of his game window accordingly?
Are we talking about WebGL builds? If so, the builds are more limited than standalone versions as they are played in browsers. Think about your future players. There is a chance that they do not have a large screen, so a lower resolution allows more people to play your game.