How do you make a world space canvas fill the entire screen

How do you make a world space canvas (when parallel to camera) fill the entire screen - at runtime

2.0f * distanceToCamera * Mathf.Tan(Mathf.Deg2Rad * (mainCamera.fieldOfView * 0.5f))
I refer you to this thread. Basically, you need to place the canvas at a given distance from the camera (distanceToCamera) and then calculate the camera’s frustum at that distance and its field of view setting. You can use this to then adjust the scale dimensions of the canvas to fit that view, but it won’t automatically adjust things (UI scale, pixel density, etc) like a CanvasScaler component would, and CanvasScalers won’t work with WorldSpace canvasses.

It’s worth noting though that if you’re planning on doing complex motions with world-space canvasses, treating them as if they’re Screen Space - Camera canvasses instead, that assets on the UAS like Rotational Menu System already handle this (and more) really well. There’s a free version for RMS here that you can check out- the only differences between it and the pay version are mostly the lack of built-in transition easing functions, and that there are far less transition types available. Feel free to tear it apart and use any aspect of it you like, including the CanvasScaler version I made.

Cheers!