Camera & Viewport - Getting corner vectors


I’m trying to get the vector3 positions of the camera viewport corners (TopLeft, TopRight, BtmLeft & BtmRight). I have:

But it’s far from correct, as it doesn’t take into account the camera’s rotation.

What is the size of the camera’s view as a vector on x & y?
How do you get the corner vector3’s A,B,C,D (see image) of the camera at any angle?



I thinks its

If not then there are ways, but off the top of my head I think this does it.