I have an issue with the HUD resizing in the editor preview mode. The game is designed for portrait view on mobile phone, and so is the HUD. When I press play in the editor, the editor plays the game in a viewport that is not the same aspect ratio as I defined in the camera. For most of the content this is not a big deal, I just get empty areas on the sides, but the HUD is stretched out over the whole viewport.
I specifically notice this when I use ‘Draw Debug String’. The x-location of the string that is drawn does not match the x-location of the actor it’s attached to. IF I start resizing the viewport of the editor so it matches the 4 by 3 portrait view, the debug text is aligned with actor again.
What I would like to know: can I tell the engine/editor to NOT stretch out the HUD over the whole editor viewport, but let it be centered and keep the aspect ratio I set in the camera and in the canvas panel of the HUD?
I hope I made my problem clear and someone knows a solution, or else I will include some screenshots.