Home > OS >  CoreServices.SceneSystem.LoadContent not working on Android device
CoreServices.SceneSystem.LoadContent not working on Android device

Time:11-22

I created a Hololens app using MRTK and Vuforia, this app starts with a menu where the user can chose between 4 scenarios. Following the enter image description here

using System.Collections;
using System.Collections.Generic;
using Microsoft.MixedReality.Toolkit;
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneLoader : MonoBehaviour
{
    /// Request that the MRTK SceneSystem load a scene of a given name.
    public void LoadScene(string sceneName) => CoreServices.SceneSystem.LoadContent(sceneName, LoadSceneMode.Single);
}

I use the same script with an hard coded sceneName to load the first scene (the menu) which is loaded and displayed on the Android device.

In the build settings I selected all the scenes and the minimum API level is set to level 30

enter image description here

What could cause this behaviour where the scenes aren't loaded except for the first one ?

[EDIT] I also tried to use SceneManager.LoadScene(id) but it's also not working on the Android device

This picture show the ARFoundation and ARCore version used
enter image description here

CodePudding user response:

It seems like Android isn't detecting events triggered by OnClick so you must use OnPress while the Hololens supports both

enter image description here

  • Related