Sorry if this has been brought up else where and I just couldn’t find it.
We are using our own Ortho camera for our 2D/GUI of our game rather than using the GUI built in to Unity, this is because we have certain requirements on our GUI that would just end up being easier if we handled our own windows/events/etc over the immediate mode stuff(Which is great for tools).
Problem is, we will align our objects to be on the edges of the view in our ortho camera and everything looks great, but if the window size changes(Full screen or just larger view or smaller, whatever) the alignment is lost, things lose their position and either get clipped or come in some, seems to only really be happening along the X axis.
I guess I’m just wondering, an ortho camera (Or any camera really) shouldn’t do that right? If it is supposed to do that, how would one going about fixing it, is there a simple trick? I would have assumed if the window size changed the GUI elements in our ortho cam would just transform/skew/stretch with the window but maintain their overall position/anchoring on the screen, thus taking up the same relative space because as far as I knew, the projection would be stretched to fit the client area on render.
Similarly I noticed our main camera will clip if its size changes as well. How do we stop this from happening? In my traditional game programming background, when you go to set up a camera one thing you do is specify its projection matrix, containing the FOV, near/far clip, aspect ratio stuff. If I am remembering correctly, whenever the window size changes, camera’s should rebuild that projection matrix with the new window size, but I doubt that’s happening or it’s happening in a weird way, is there a way to force camera projection matrix to refresh based on new window size or am I way off?