Search Results for

    Create XR Scene

    Install XR Interaction Toolkit

    1. From the menu bar, select Window > Package Manager.

    2. In the Package Manager window, select Unity Registry from the Packages.

    3. Scroll down to select XR Interaction Toolkit, and select Install.

      XRInteractionToolkit

    4. After installation, you will be prompted to restart the Unity Editor. Select Yes.

    5. From the menu bar, select Window > Package Manager > XR Interaction Toolkit > Start Assets. Select Import.

      Tip

      Although Core SDK does not depend on XR Interaction Toolkit, we recommend you to install XR Interaction Toolkit for a better experience.

      Important

      Please do this step as it affects the Setup Controller steps.

    Add XR Camera

    1. By default, the new project contains a sample scene. Under SampleScene, right-click Main Camera and select Delete to remove the current camera.

      MainCamera

    2. Under the Hierarchy panel, select + > XR > XR Origin (VR).

    3. Add YVRManager component to XR Origin (XR Rig) and ensure that Use Unity XR flag is turned on.

      YVRManager

    Add 3D Object

    1. Under the Hierarchy panel, select + > 3D > Plane.

    2. A white plane is added to the scene.

      Plane

    3. Select Plane under the Hierarchy panel. Under Inspector panel, set Transform Component as the following:

      • Position: (0, 0, 0)
      • Rotation: (0, 0, 0)
      • Scale: (10, 1, 10)

      TransformComponent

    Setup Controller

    1. Under the Hierarchy panel, expand XR Origin (XR Rig) > Camera Offset, select Left Controller.

    2. Under the Inspector panel, select XR Controller (Action-based) script > Preset.

      Preset

    3. In the Select Preset window, select XRI Default Left Controller.

    4. Under the Project panel, select Packages > YVR Core > Prefabs. Drag TouchController_Left.prefab to Model Prefab.

    5. Repeat the above steps for Right Controller.

    6. Under the Hierarchy panel, select XR Origin (XR Rig).

    7. Under Input Action Manager script, expand Action Assets and select +.

      ActionAssets

    8. Search XRI Default Input Actions and add to Element 0.

      Element0

    In This Article