# 7. FAQs

# 7.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()
    {
        
    }
}

# 7.2 Old Version Porting

# 7.2.1 From versions prior to 1.0.0

  1. When porting to UnityXR SDK v1.0.0 from v0.X, you must delete all the files of the old SDK (delete the QYVRSDK folder, QYVR Sample folder), and then import the new XR plug-in in PackageManager.
  2. The APIs are unified in UnityXR Framework. Unity Editor Console may report error when the v1.0.0 package is imported, you should replace the corresponding APIs according to the documentation.
  3. The scripts and components hanging on the original "QVR Camera" prefab and its children should be moved to the "XR Rig" prefab as needed.

# 7.2.2 From version 1.0.0 and above

Unzip the SDK ZIP, then click "package PackageManager->Add package from disk...", and import the new package.json.

# 7.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)

# 7.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:

img

Fig 7.4.1 Newtonsoft confilict

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

Fig 7.4.2 Delete JsonDotNet Folder

# 7.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

# 7.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

img

Fig 7.6 switch the system language

# 7.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 7.7 Bundle Version Code

# 7.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.

# 7.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.

Fig7.8.1 FMOD Output Mode

# 7.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.

Fig7.8.2 Wwise Audio API

# 7.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.

Fig7.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.

Fig7.9.2 Delete QiyuRecenter

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