unity 2020 The scene is not loaded ERROR
Hi , I use Unity 2020.3.48f1 with Oculus integration version 53.1 and it gives me this error in the console everytime over and over again "ArgumentException: The scene is not loaded. UnityEngine.SceneManagement.Scene.GetRootGameObjects (System.Collections.Generic.List`1[T] rootGameObjects) (at <913bb12059fd4cef8da5cc94ad2f0933>:0) UnityEngine.SceneManagement.Scene.GetRootGameObjects () (at <913bb12059fd4cef8da5cc94ad2f0933>:0) Oculus.Interaction.Editor.UnityObjectAddedBroadcaster.HandleSceneOpened (UnityEngine.SceneManagement.Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode, System.Collections.Generic.HashSet`1[T] knownIds) (at Assets/Oculus/Interaction/Editor/AutoWiring/UnityObjectAddedBroadcaster.cs:87) Oculus.Interaction.Editor.UnityObjectAddedBroadcaster+<>c__DisplayClass8_0.<.cctor>b__0 (UnityEngine.SceneManagement.Scene scene, UnityEditor.SceneManagement.OpenSceneMode mode) (at Assets/Oculus/Interaction/Editor/AutoWiring/UnityObjectAddedBroadcaster.cs:44) Oculus.Interaction.Editor.UnityObjectAddedBroadcaster..cctor () (at Assets/Oculus/Interaction/Editor/AutoWiring/UnityObjectAddedBroadcaster.cs:76) Rethrow as TypeInitializationException: The type initializer for 'Oculus.Interaction.Editor.UnityObjectAddedBroadcaster' threw an exception. Oculus.Interaction.Editor.UnityObjectAddedBroadcaster+<>c__DisplayClass8_0.<.cctor>b__1 () (at Assets/Oculus/Interaction/Editor/AutoWiring/UnityObjectAddedBroadcaster.cs:49) UnityEditor.EditorApplication.Internal_CallHierarchyHasChanged () (at <25578071f6e44201aac745680e5c8dfc>:0)" I can export my game but I still don't understand this error.3.8KViews4likes7CommentsMetaXR feature causes crash in Editor
I have created a combined Unity project for the Quest and the HTC Vive. I was hoping OpenXR could be used for both, but unfortunately for Quest I still need the Oculus Integration package for the entitlement check and that again requires the Oculus XR plugin. So i cannot use OpenXR for Android builds. But I still want to use OpenXR for PC Windows builds. In the Project Setting for PC I see the MetaXR Feature, which should not be there because I am not building for Oculus. If I disable it I get a noticifcation when I press Play that the feature must be enabled. But when I enable it and then press Play the editor crashes. After upgrading the Oculus Integration package to version 51 I notice a flag 'oculus Quest Quest Support', which is very weird for a PC build target. When I disabled both this flag and the MetaXR feature and pressed Play the editor stil crashed. After restarting the option was gone and replaced with 'Use Mock HMD' What is happening and how can I get rid of the MetaXR feature popup for the PC build? unity 2020.3.19 Oculus Integration version 511.5KViews3likes1CommentOculus Quest - Need to Dismiss Oculus Menu Bar After Permissions Window Closes
To give some background, Android introduced file storage access restrictions with Android 11. This has presented a problem with some Unity apps I've been working on as they are currently set up to function like so: 1. A launcher app downloads AssetBundles to a particular location on external storage. 2. The launcher app launches another Unity app based on user selection. This app then loads the AssetBundle files from the location that the launcher app downloaded them to. With the new restrictions, this doesn't seem to work at all regardless of where on external storage I try to download the files. Either the launcher app can't download the files there or the launched app doesn't have access to open them. As a workaround I'm using the MANAGE_EXTERNAL_STORAGE permission as detailed here: https://developer.android.com/training/data-storage/manage-all-files I'm aware that this is a restricted permission, but I'm not intending to distribute these apps on the store, so that shouldn't be an issue. Requesting this permission seems to resolve the problem. However, I'm running into an issue with the behavior of this permission window that I'm bringing up. This permission seems function differently than the other Android permissions and I had no luck using Unity's Permissions API to request it. I had to use direct Android calls in order to request the permission properly. Like so: using (AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject currentActivity = unityPlayer.GetStatic<AndroidJavaObject ("currentActivity")) { using (AndroidJavaClass uri = new AndroidJavaClass("android.net.Uri")) { using (AndroidJavaObject intentUri = uri.CallStatic<AndroidJavaObject>("parse", $"package:{Application.identifier}")) { using (AndroidJavaClass settings = new AndroidJavaClass("android.provider.Settings")) { string permission = settings.GetStatic<string>("ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION"); using (AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent", permission, intentUri)) { Debug.Log($"AssetLoader - Request storage access permissions..."); _waitingForPermissions = true; currentActivity.Call("startActivity", intent); } } } } } } Unfortunately I can't even really show you what this window looks like because the Quest doesn't seem to capture it properly in either screenshots or video recordings (circled in red where it's supposed to be). The relevant part though is that the Oculus menu bar seems to also appear along with this permissions window as if the user had pressed the Oculus button on the right hand controller (green arrow). Unfortunately, when the user closes the permissions menu, this menu bar is not dismissed along with it. Even though the app seems to regain focus (OnApplicationFocus gets hit with and hasFocus is true) this STILL seems to prevent the user from interacting with the app in any way until they manually hit the Oculus button and resume the background app. I've tried a number of different solutions to try and wrest control back from the Oculus OS such as launching the UnityPlayerActivity again with the FLAG_ACTIVITY_REORDER_TO_FRONT and FLAG_ACTIVITY_CLEAR_TOP intent flags and using startActivityForResult to launch the permissions window and then calling finishActivity in OnApplicationFocus. However this still does not dismiss the menu bar. I've also tried making an Android plugin that serves as a mini activity whose only purpose is to request the permission, but this mini activity runs into the same problem. Has anyone run into this issue when trying to start other android activities from a Unity app? Is there any sort of native call I can make via the Oculus SDK to dismiss this menu myself without the user having to manually do it themselves? I can try bringing up some sort of prompt to tell the user that they have to do so, but it's far from an ideal user experience.1.3KViews3likes0CommentsIs it possible to use Text inside an OVROverlay component in Unity?
I am currently working on a project in Unity that utilizes the OVROverlay component for virtual reality. I want to add text to the overlay, but I'm not sure if it's possible to do so using the Text component in Unity (without having to convert it to a texture) or is there a similar component that takes text as input. Has anyone had experience with this and can offer any guidance or solutions? Any insights would be greatly appreciated. Thank you! Unity Version - 2020.3.44f1 Device - Meta Quest 2752Views0likes0Comments