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
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
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
CodePudding user response:
It seems like Android isn't detecting events triggered by OnClick
so you must use OnPress
while the Hololens supports both