Frame grid of actors in viewport

Heya, I have a grid of a dynamic size (might change it to static size, don’t think that matters for this question) for a mobile game. I hope to make it available for most mobile devices so the resolution will change.

I’d like to get my grid of square actors to perfectly fit the screen’s width - does anyone have a good idea how to approach this? My camera is a perspective camera and would rather not use an ortho (not even sure if that would be easier to use).

Thanks in advance.

Here is a way to do it :

Orthographic Projection : OrthoWidth = GridWidth
Perspective Projection : Offset = GridWidth / 2