Cavrnus on Multiple Devices (Unity)

In general, Cavrnus does not interfere with whichever device you wish to deploy your Application on. Most of the Cavrnus Spaces/Properties systems are just code and will run on whatever Unity will build to.

However, our Voice & Video systems, as well as our Content systems, required us to build more custom systems and integrations. This means that, if building to a device not listed below, these systems may just work, but may also have issues.

Supported Devices

Devices that fully work with Cavrnus include:

  • Windows (incl. tethered XR)

  • MacOS

  • iOS

  • visionOS

  • Android

  • Android-based XR Devices

    • Quest

    • etc…

UNITY PROJECTS IMPORTANT MUST READ

  1. MUST SET FOR ALL DEVICES: Go to Project Settings->Player-Other Settings and scroll down. Make sure to set “Managed Stripping Level" to Minimal or Disabled.

    image-20240227-195104.png

  2. Windows and MacOS

    1. IMPORTANT: In Project Settings->Player->Resolution and Presentation check “Run In Background”. If this is not checked when you switch between applications voice/video streaming will stop working, and also copresence and connection to the server will stop.

      image-20240227-194901.png
  3. All Devices

    1. If using Cavrnus' voice/video streaming system, go to Project Settings->Audio and set DSP Buffer Size to “Best Latency”

  4. MacOS, iOS and visionOS

    1. IMPORTANT: Unity Editor for Silicon - When running in the Editor for MacOS, iOS or visionOS; if you are running the Unity Editor for Silicon the Cavrnus voice/video streaming system will not work in Editor, this will also cause errors when trying to connect to a space so when running the Unity Editor for Silicon you must “Disable Voice and Video” in the Cavrnus Spatial Connector.

    2. IMPORTANT: Unity Editor for Intel64 - If you want voice/video streaming to work in the Unity Editor than launch the Unity Editor for Intel64.

  5. MacOS

    1. IMPORTANT: When building a MacOS application, if you are using Cavrnus voice/video streaming you must build it to Intel64 for the voice/video streaming system to work.

  6. iOS and visionOS

    • IMPORTANT: When building to a iOS, visionOS device, if using voice/video streaming, in the XCODE project go to UnityFramework->Build Phases->Link Binary With Libraries and select the libvpxfm-iOS.a, libopusfm-iOS.a and libyuvfm-iOS.a and move to the top of the list. See screenshot below.

  7. visionOS

    • IMPORTANT: When building to visionOS device in the XCODE project in Preprocessors.h set UNITY_USES_WEBCAM=0

  8. Magic Leap

    • IMPORTANT: When building to a Magic Leap device make sure to Check “Disable Acoustic Echo Cancellation” in the Cavrnus Spatial Connector

  9. In Unity make sure to have your Scale for the UI on the top of Unity set to 1, otherwise you may not see the default Cavrnus UI that gets loaded on start.

Building to Unsupported Devices

If you want to build to a device not included in this list, there is a chance systems like Voice & Video + Cloud Content won’t work. That being said, there is a chance they will, so it may be worth testing them.

If they do cause issues, you can tell the CavrnusSpatialConnector to not attempt to run those systems. These options can be found in the Cavrnus Spatial Connector.

Integrating XR Rigs

One thing to be careful of when integrating XR Rigs is choosing the right Transform to synchronize. Our default SyncTransform will synchronize the Local Transform. However, in an XR Rig there are often several levels of Transform all moving in parallel.

One solution is to write a Sync script to send the Global Transform, and put that on the relevant node of your Rig.

Avatars are displayed at the Scene root, so sending them a Global Transform isn’t a problem.

Building the Same Project to Multiple Devices

Oftentimes you will want a single project/experience to be built to multiple different devices. One example of this could be a Training Simulation, with Students in XR Headsets, and an instructor in a desktop view on Windows.

Cavrnus has no issues with cross-device communication, so you would simply do this the way you would build a single-user application to multiple devices.

The easiest methodology is to simply have two identical versions of your scene, with the only difference being if the local user is a Desktop Character Controller, or an XR Rig: