Level: Beginner
Reading Time: 2 minutes
Checked with: Unity 2019.3.0f6
The CameraRigs.UnityXRPluginFramework
prefab provides a spatial camera rig and controller setup utilizing the XR Plugin Framework provided by the Unity software. This prefab can be included in a Unity software project via the Unity Package Manager.
You may skip this step if you already have a Unity project to import the package into.
- Create a new project in the Unity software version
2019.3.0f6
(or above) using3D Template
or open an existing project.
- Configure the project for XR:
- In the Unity software select
Main Menu -> Edit -> Project Settings
to open theProject Settings
inspector. - Select
XR Plug-in Management
. ClickInstall XR Plug-in Management
if the package hasn’t been installed already. You can also install it from the Package Manager window. - After installation completes, select a Plug-in Provider to enable it for the corresponding build target. To do this:
- Select a build target (for example, Android).
- Select the checkbox to the left of each plug-in you want to use for that build target.
- After a plug-in loads, it displays in the left-hand navigation, under XR Plug-in Management. Click the plug-in to configure its settings for each build target.
- In the Unity software select
The
Configure the project for XR
steps are adapted from the official Unity Configuring your Unity Project for XR guide.
-
Navigate to the
Packages
directory of your project. -
Adjust the project manifest file
manifest.json
in a text editor.- Ensure
https://registry.npmjs.org/
is part ofscopedRegistries
.- Ensure
io.extendreality
is part ofscopes
.
- Ensure
- Add
io.extendreality.tilia.camerarigs.xrpluginframework.unity
todependencies
, stating the latest version.
A minimal example ends up looking like this. Please note that the version
X.Y.Z
stated here is to be replaced with the latest released version which is currently .{ "scopedRegistries": [ { "name": "npmjs", "url": "https://registry.npmjs.org/", "scopes": [ "io.extendreality" ] } ], "dependencies": { "io.extendreality.tilia.camerarigs.xrpluginframework.unity": "X.Y.Z", ... } }
- Ensure
-
Switch back to the Unity software and wait for it to finish importing the added package.
The Tilia CameraRigs XRPluginFramework Unity
package will now be available in your Unity project Packages
directory ready for use in your project.
The package will now also show up in the Unity Package Manager UI. From then on the package can be updated by selecting the package in the Unity Package Manager and clicking on the Update
button or using the version selection UI.