# 6. FAQs

# 6.1 XR Rig

  1. If you have multiple scenes with XR Rig in each scene, the Position and Rotation will be automatically reset when you change to a new scene, and the TrackingOriginMode will be recalcated.
  2. If you want to keep a single XRRig in the APP, you can make a startup scene with XRRig, and keep XRRig from destroyed via GameObject.DontDestroyOnLoad. Don’t place the XRRig in other scenes. This ensures that the Position and Rotation will not be reset and the TrackingOriginMode will not be recalculated when the scene is changed.
  3. If you keep a single XR Rig, please make sure that the XR Interaction Manager and QiyuManager are not destroyed at the same time.
  4. If the APP keep a single XR Rig and there is no raycast interaction when switch to another scene, event Camera should be set on the Canvas through coding. In addition, XRRayInterActor need reinitialization(possibly it's Unity Issue). Hide and show XRRay is useful. A sample script attached to UI Canvas is as follow:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class QiyuCanvasController : MonoBehaviour
{
    Canvas canvas;
    private void Awake()
    {
        canvas = GetComponent<Canvas>();
        canvas.renderMode = RenderMode.WorldSpace;
        canvas.worldCamera = Camera.main;
    }
    // Start is called before the first frame update
    IEnumerator Start()
    {
        XRRayInteractor[] xRRayInteractor = FindObjectsOfType<XRRayInteractor>();
        foreach (XRRayInteractor xrRay in xRRayInteractor)
        {
            xrRay.gameObject.SetActive(false);
            yield return new  WaitForEndOfFrame();
            xrRay.gameObject.SetActive(true);
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

# 6.2 Old Version Porting

# 6.2.1 Porting from v0.4 and previous version to the latest version of SDK

  1. When porting from QIYU Unity SDK v0.4 and preview version to UnityXR SDK v1.0.0, the all the old version files including QYVRSDK, QIVR Sample and prefabs in scenes should be deleted, and then importing the new XR Plugin by Unity Package Manager.

  2. Since Unity XR SDK v1.0.0 has unified XR APIs names, after deleting the old version SDK and importing new XR SDK, the relatived API names should be replaced by QIYU and UnityXR guideline if errors appeared in Unity Editor Log.

  3. Please transfer all the "QVR Camera" Prefab and its child GameObjects and Components to "XR Rig" Prefab.

# 6.2.2 Porting from v1.2.1 and previous version to the latest version

Unizip the SDK package, and import the package.json at PackageManager->Add package from disk.

# 6.2.3 Boundary APIs port from v1.2.1 and previous version to the latest one.

The old version QiyuBoundary in Sample has been changed as a static method.

  • Unity XR SDK v1.2.1 and previous version:
QiyuBoundary boundary = new QiyuBoundary();
boundary.GetConfigured()
boundary.SetVisible(true)
boundary.GetVisible()
boundary.TestNode(QiyuBoundary.Node.HandRight)
boundary.TestPoint(Vector3 point)
boundary.GetGeometry()
boundary.GetDimensions()

QiyuPlugin.GetFloorLevel()
  • Unity XR SDK v1.3.0 and above version::
QiyuBoundary.GetConfigured()
QiyuBoundary.SetVisible(true)
QiyuBoundary.GetVisible()
QiyuBoundary.TestNode(QiyuBoundary.Node.HandRight)
QiyuBoundary.TestPoint(Vector3 point)
QiyuBoundary.GetGeometry()
QiyuBoundary.GetDimensions()

QiyuXRCore.GetFloorLevel()

# 6.3 Multilingual AppName Configuration

If you need to display different APP names in different system languages, you need to import the Android multilingual configuration file when build and configure different app_name fields in each language string.xml. Samples of multilingual packages can be downloaded here:

Multi Language Configuration (opens new window)

# 6.4 Newtonsoft JSON Conflict

NewtonSoft in SDK v1.0.0. and NewtonSoft plugin is built-in PackageManager above Unity2020 are in conflict, which has been fixed in SDK1.0.2. If there is an error in the project as follows:

Fig 6.4.1 Newtonsoft confilict

You can remove the JsonDotNet directory under the SDK directory, as shown below:

Fig 6.4.2 Delete JsonDotNet Folder

# 6.5 Application uploading to QIYU Platform

QIYU developer portal will check the name, signature, release version, application version code, QIYU SDK version and Android SDK version of the uploading application. Please check those information of your application before submission.

  • Package name: The name of package should not same as the other package name of other developers. If it same, the notification
  • Signature: the release signature should be accepted only. If the package is not the first time to upload to QIYU portal, the signature of uploading package should same as the live version package's. Please refer to https://docs.unity3d.com/2020.3/Documentation/Manual/class-PlayerSettingsAndroid.html#Publishing
  • Release version: Disable the "Development Build"
  • Application version code: if the package is not the first time to upload to QIYU portal, the version code should higher than live version
  • QIYU SDK version: QIYU Developer portal does not accept the version lower than 1.0.0
  • Android SDK version: QIYU Developer portal does not accept the version lower than 26

# 6.6 How to switch the system language in QIYU VR

  1. On the main interface,choose the “设置” button(the blue icon)
  2. Find the first menu “通用”
  3. The 6th column is setting language. Choose English
Fig 6.6 switch the system language

# 6.7 Authentication

On v5.0.10 or above OS version, if your application has been already released on QIYU APPs store, and you want to build a new version of release package running on QIYU3 devices, the Bundle version code of the updated application must higher than the one's in the store.

Fig 6.7 Bundle Version Code

# 6.8 General Audio Plugin

The some of default settings are not supported by QIYU device, which will cause the record video not sound. Please refer to the modification on the following plugins.

# 6.8.1 FMOD Plugin

If you use FMOD plugin to make in-game sounds, please setting the Output Mode to ‘Java Audio Track’ in FMOD Setting, otherwise, the recorded video would be no voice.

Fig6.8.1 FMOD Output Mode

# 6.8.2 Wwise Plugin

If you use Wwise plugin to make in-game sounds, please setting Audio API to 'Open SL_ES’ in the Wwise Initialization, otherwise, the recorded video would be no voice.

Fig6.8.2 Wwise Audio API

# 6.8.3 Photon Online Voice Communication

If using the Photon plug-in to achieve the audio in application, and the larger different between BGM sound and voice, for example, BGM is much larger than voice or Voice is much larger than BGM, please modify the scale for BGM or voice (please refer to the red circle area in Fig 6.8.3.2) in Audio source. please refer to Fig 6.8.3.1 the Photon plug-in flow chart and Fig 6.8.3.2 Audio Source configuration.

Fig 6.8.3.1 The Photon plug-in flow chart
Fig 6.8.3.2 Audio Source configuration

# 6.9 Multiple Recenter Loading UI

The OS system will manage the recenter function in the QIYU SDK v1.2.0 or above, developer does not need to add “QiyuManager” or “QiyuRecenter” to achieve the recenter.

Fig6.9.1 Multiple Recenter Loading UI

If "QiyuManager" prefab was modified and QIYU Unity SDK is upgraded to v1.2.0 or above in your project , after long pressing the Home button, it might be appeared more than one Loading UI (Especially, shake the head during the recenter). Please check whether the "QIYURecenter" prefab is in the scene hierarchy, and delete if it exists.

Fig6.9.2 Delete QiyuRecenter

If the recenter loading animation appear correct, please ignore this suggestion.

# 6.10 URP Project Known Issues:

  1. Using Vulkan. the UPR project will appear the black screen randomly.
  2. Please do not set eyeTextureResolutionScale=1.0 (it would not work if set 1).
  3. In URP project, please disable the HDR (default enable) when using underlay.
  4. In URP project, FFR modification would not work on Unity 2020 and 2021.