Adjusting Projection Based on IPD Values in Meta Quest 3 with Unity CloudXR Plugin

All CloudXR clients are required to provide at least one projection during startup, otherwise the server has nothing valid to render. Typically this is done through the cxrDeviceDesc struct passed through cxrReceiverDesc (docs). In the Unity client plugin code, this is done (rather complicatedly) by this code:

// Per eye raw projection extents: tangents of the half-angles from the center view axis. 
//     0|1 for left|right eye, then 0-3 for left, right, top, bottom edges.
float[] p = GetProjectionFlattened();
Log.I($"Projection:  {p[0]},{p[1]},{p[2]},{p[3]}   {p[4]},{p[5]},{p[6]},{p[7]}");
System.IntPtr floatptr = (System.IntPtr)(SWIGTYPE_p_a_4__float.getCPtr(_dd.proj));
Marshal.Copy(p,0,floatptr,8);

You can follow the code in GetProjectionFlattened() to see how this plugin is getting the projection from Unity’s camera, which (due to how XR cameras are set up in Unity) is automatically set up by Unity’s XR subsystems via whatever XR provider you select vie Project Settings > XR.