Hey everyone!
Im having some trouble trying to place my HUD correctly.
Basically, I want to put my HUD on the bottom of the screen and not overlapping the “game render area”.
Is this possible?
Here is the example of what Im looking for:
This is what I got (the HUD overlaps the game area):
This what I want:
Whats the best layout type for this?
A good example would be a DOOM2 HUD:
thanks!
I don’t think you can really do that unless you use a RenderTexture on a UI Texture or something.
Besides, there is not really any reason not to overlay the HUD. You can add flat color images to blot out the game area to make it appear to be whatever ‘size’ you want.
Using a Render Texture doesnt prevent the overlay.
The reason Im trying to get rid off the overlay is because of the screen space that it takes from the game renderer.
Is it possible to at least resize the game render area?
Ah, actually you can change the Viewport Rect on the camera (always wondered what this was for
). The values are screenspace percentage normalized. X & Y are position, W & H are size.
You should be able to get it where you want it with those values. I’m not certain if this affects performance like you would expect, though.
Cool, that seems to fix the problem.
Can you give me a link with info regarding that performance issue?
Thanks