FAQs - Develop

Frequently asked questions related to development

Rendering

# Even After Importing the SDK, my screen is rendering in mono view!

Solution 1: Custom Build files should be selected

Make sure all of these are checked in the project settings > publishing settings:

  • Custom Main Manifest

  • Custom Main Gradle Template

  • Custom Base Gradle Template

  • Custom Gradle Properties Template

Solution 2: Using the correct canvas

The application can appear to be on a single screen as it covers the entire screen space. Therefore, if you are using overlay canvas, switch it to world space or JMRSDK canvas.

Solution 3: Incorrectly imported SDK

This issue usually occurs when the files are not properly imported into the project. If you are facing this issue, follow the below-mentioned Steps: 1. Delete the folder inside the Assets >> Plugins >> Android 2. Re-import the JMRSDK plugins folder.

# Layer not rendering

Go to the head, left, and right cameras and enable/disable the required layer in the culling mask of the cameras.

Do check the culling mask at runtime -

On Head camera - Left and Right layer gets disabled On Left camera - Head and Right layer gets disabled On Right camera - Head and left layer gets disabled

Default behavior: Layer number 13 is used internally for the screen casting. So layer 13 does not render anything in left and right cameras. This might change depending on your project settings.

Layer "Left" and Layer "Right" does not render on respective cameras so you can use these layers if you want to render some object only on some particular camera.

Unity - NOT in Play Mode

General

# How to check the application's JMRSDK version?

In unity editor, Goto JMRSDK > Core > Plugins > Android > Readme > tmrServicesSDK-release-JMRSDK Version

In apk, Check the AndroidManifest.xml of your application build using android studio or any 3rd party analyzer for meta data - com.jiotesseract.DeviceServiceSDKVersion corresponding to which SDK version is present.

# How to implement quit functionality from the application?

With JMRSDK 4.27.10, implementing quit functionality is only possible through JMR Toolkit and with the Home page setup.

Setting Homepage (Quit functionality)

# There are debug logs/warnings/errors coming from JMRSDK

These are the debug logs/warnings/errors to be ignored in the current JMRSDK

  1. Cannot destroy GameObject that is part of a prefab instance.

  1. NullReferenceException: Object reference not set to an instance of an object JMRSDK.JMRCameraManager.OnEnable ()

  2. Casting API instance is null UnityEngine.Debug:LogError (object) JMRSDK.JMRScreenCastManager:GetCastingState ()

  3. RegisterCallback : Camera API is Null UnityEngine.Debug:LogError (object)

  4. Casting API instance is null UnityEngine.Debug:LogError (object)

  5. NullReferenceException: Object reference not set to an instance of an object ScreenCasting.ScreenCastHandler.b__52_0 (System.Boolean isConnected) (at Assets/JMRSDK/Screencast/ScreenCastHandler.cs:664) ScreenCasting.ScreenCastHandler+d__54.MoveNext () (at Assets/JMRSDK/Screencast/ScreenCastHandler.cs:722)

Note: Debug error 6 arises once every 3 seconds

Hiding these errors: Debug Error 2,3,4,5,6 are related to screen casting. If you want to hide these errors for development purposes, disable JMRCamera Manager.

# Application is facing Z-Fighting

When two or more primitives have very similar distances to the camera. This would cause them to have near-similar or identical values in the z-buffer, which keeps track of depth.

To fix that, physically move the objects further apart

Input

# Input Interaction is not working

  1. Make sure that you have added the global listener to the gameobject if you want it to register input when the pointer is not focusing on the gameobject

  2. To enable the Controller Input Actions APIs, you must add JMRInteraction Script to a GameObject in your scene.

  3. Use this keybinding for triggering input in the unity editor.

# How to implement Gaze and Dwell?

Refer to this:

Gaze and Dwell

# How to check which pointing source is being used?

You can get the pointing source from JMRPointerManager. Refer to this:

Gaze and Dwell

# Which controller buttons work with 'Gaze and Dwell' mode?

Although the controller can remain connected when 'gaze and dwell' is enabled, only the home button works to switch the application to the MR Launcher screen.

None of the other buttons or actions are registered when 'Gaze and Dwell' is enabled.

Device

# How to get the device on which the application is running?

JMRRigManager.Instance.getDeviceID();
Editor = int_max,
JioHoloboard = 1,
JioGlass = 2,
JioCardboard = 3

Use this code to change the controller in application instructions

Editor = Unity editor
JioHoloboard = JioPrism - Physical Controller
JioGlass = JioGlass Lite - Virtual Controller
JioCardboard = JioDive - Physical Controller

# How to add skybox to AR devices - JioGlass and JioPrism

Refer to Skybox in AR devices

# How to change FOV in devices

FOV is changed automatically according to the selected device.

However, if you want to update the FOV, you can do so after a few frames from the start of the JMRMixedReality prefab instance.

Use this code for specific device type to change FOV only for that device.

private void Awake()
{
    head = JMRRigManager.Instance.transform.Find("JMRRenderer/Head")?.GetComponent<Camera>();
    left = JMRRigManager.Instance.transform.Find("JMRRenderer/Head/Left")?.GetComponent<Camera>();
    right = JMRRigManager.Instance.transform.Find("JMRRenderer/Head/Right")?.GetComponent<Camera>();
}

private void OnEnable()
{
    StartCoroutine(ChangeFOV());
}

IEnumerator ChangeFOV()
{
    for (int i = 0; i < 2; i++) yield return null;
    head.fov = left.fov = right.fov = targetFOV;
}

Last updated