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.
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.
If you keep a single XR Rig, please make sure that the XR Interaction Manager and QiyuManager are not destroyed at the same time.
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.1 Porting from v0.4 and previous version to the latest version of SDK
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.
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.
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.
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:
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:
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
On the main interface,choose the “设置” button(the blue icon)
Find the first menu “通用”
The 6th column is setting language. Choose English
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.
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.
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.
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.
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.
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.