public Vector2f getCanvasSize() {
        if (environment != null){

            if (environment.getApplication() != null){
                if( screenSize == null ) {
                    if( environment.isInVR() && environment.getVRHardware() != null ) {
                        screenSize = new Vector2f();
                        environment.getVRHardware().getRenderSize(screenSize);
                        screenSize.multLocal(environment.getVRViewManager().getResolutionMuliplier());
                    } else {
                        AppSettings as = environment.getApplication().getContext().getSettings();
                        screenSize = new Vector2f(as.getWidth(), as.getHeight());
                    }
                }
                return screenSize;
            } else {
                throw new IllegalStateException("VR GUI manager underlying environment is not attached to any application.");
            }
        } else {
            throw new IllegalStateException("VR GUI manager is not attached to any environment.");
        }
    }
Get the GUI canvas size. This method return the size in pixels of the GUI available area within the VR view.
@return the GUI canvas size. This method return the size in pixels of the GUI available area within the VR view.
jme3-vr/src/main/java/com/jme3/util/VRGuiManager.java