Virtus Posted May 6 Author Share Posted May 6 Sure ! For the sample scene it also doesn't work, unfortunately. There might be something i'm missing in what I am doing, but I am following all the steps given by the tutorials. For the error I get, I used the sample code given. private void OnEnable() { //Check whether feature is supported on device or not if ((Int erop.WVR_GetSupportedFeatures() & (ulong)WVR_SupportedFeature.WVR_SupportedFeature_ScenePerception) != 0) { WVR_Result result = scenePerceptionManager.StartScene(); if (result == WVR_Result.WVR_Success) { result = scenePerceptionManager.StartScenePerception(WVR_ScenePerceptionTarget.WVR_ScenePerceptionTarget_2dPlane); //Start perceiving 2D planes if (result == WVR_Result.WVR_Success) { isSceneCMPStarted = true; //Examples of things to do here: //Scene Planes ScenePerceptionGetState(); //- Call scenePerceptionManager.GetScenePerceptionState() to see the current WVR_ScenePerceptionState of a specific WVR_ScenePerceptionTarget //- Call scenePerceptionManager.StopScenePerception() to stop perceiving a specific WVR_ScenePerceptionTarget // //Spatial Anchors //- Call scenePerceptionManager.GetSpatialAnchors() to retrieve all handles of existing anchors //scenePerceptionManager.GetSpatialAnchors(); //- Using the retrieved handles, call scenePerceptionManager.GetSpatialAnchorState() to get information of the Spatial Anchors } } } else { Debug.Log("--------SCENE PERCEPTION NOT AVAILABLE ON DEVICE--------"); } } private void OnDisable() { if (isSceneCMPStarted) { scenePerceptionManager.StopScene(); } } //Sample Code for getting the 2D plane perception state public void ScenePerceptionGetState() { WVR_ScenePerceptionState latestPerceptionState = WVR_ScenePerceptionState.WVR_ScenePerceptionState_Empty; WVR_Result result = scenePerceptionManager.GetScenePerceptionState(WVR_ScenePerceptionTarget.WVR_ScenePerceptionTarget_2dPlane, ref latestPerceptionState); if (result == WVR_Result.WVR_Success) { //Check perception state here if (latestPerceptionState == WVR_ScenePerceptionState.WVR_ScenePerceptionState_Completed) { //When perception for 2d planes is completed, you can retrieve the data of the perceived Scene Planes WVR_ScenePlane[] latestScenePlanes; result = scenePerceptionManager.GetScenePlanes(ScenePerceptionManager.GetCurrentPoseOriginModel(), out latestScenePlanes); if (result == WVR_Result.WVR_Success) { Debug.Log("--- Scene Perception State for 2D PLANE : OK ---"); //Handle the retrieved data of the Scene Planes here //For example: //- Cache Scene Plane data for future reference //- Compare extent and pose of cached Scene Planes with the freshly retrieved ones to see if there are any updates } else { Debug.Log("-----ERROR : NOT ABLE TO RETRIEVE SCENE PLANES-----"); } } } } Those are the functions given, and I get the error at the beginning, saying that scene perception is not available on device. I tried to bypass it by removing the compatibility check, and the code runs successfully to retrieving scene planes, except that there are no scene planes in "latestScenePlanes". I scanned the room in order to be sure that there are scene planes stored in the device. I guess it is because Unity takes the computer as the device, and of course a computer isn't a scene perception compatible device. I don't know how to fix this though. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted May 6 Share Posted May 6 Hi @Virtus, Could you check if you did below step? Is "Enable Scene Perception" checked? https://hub.vive.com/storage/docs/en-us/UnityXR/UnityXRScenePerception.html Link to comment Share on other sites More sharing options...
Virtus Posted May 6 Author Share Posted May 6 Yes, I enabled both Scene Perception and Scene Mesh in my Wave XR settings. I can provide you some screenshots of my project settings. Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted May 6 Share Posted May 6 Hi @Virtus, I saw your XR Plug-in Management has Oculus? Could you check AndroidManifest.xml (Under Assets\Plugins\Android folder)? I am not sure if there is any conflict when Oculus plugin is available in the same project. Link to comment Share on other sites More sharing options...
Virtus Posted May 6 Author Share Posted May 6 The Android folder is empty. Should I have created that file earlier or should it be done automaticly ? Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted May 6 Share Posted May 6 Hi @Virtus, You can make a copy of AndroidManifest.xml during compile time. It is created and deleted after apk is built. Could you try removing Oculus related plugin or files from your project? Link to comment Share on other sites More sharing options...
Virtus Posted May 6 Author Share Posted May 6 I just created an empty project, and Oculus is added via XR Plugin Management plugin. So I don't think it is possible to remove it. Link to comment Share on other sites More sharing options...
Virtus Posted May 6 Author Share Posted May 6 (edited) For the AndroidManifest.xml, I did something like this to finally get one : In project settings > Wave XR > XRDSK > Import Feature - Custom Android Manifest then I copied the file located in Assets/Wave/XR/Platform/Android at Assets/Plugins/Android and added <uses-feature android:name="wave.feature.sceneperception" android:required="true" /> <uses-permission android:name="wave.permission.GET_SCENE_MESH" /> under </application> (sorry for VS color theme, I know it's too much 😂) Edited May 6 by Virtus Link to comment Share on other sites More sharing options...
VIVE_chengnay Posted May 7 Share Posted May 7 Hi @Virtus, Could you collect the log before you launch your application until you get the error? > adb logcat > filename Thanks! 11 hours ago, Virtus said: I just created an empty project, and Oculus is added via XR Plugin Management plugin. So I don't think it is possible to remove it. I think Oculus is included by default. I forgot about this. Link to comment Share on other sites More sharing options...
Virtus Posted May 30 Author Share Posted May 30 (edited) Hello, Sorry for the late reply, had to send the Headset to the After-Sales Service, so I couldn't dev on it. I don't know how to retrieve the logs, I don't use adb for now since I don't build the project for embedded testing. I launch the project directly from unity and get the passthrough on the headset. I have followed the Scene Perception tutorial (https://hub.vive.com/storage/docs/en-us/UnityXR/UnityXRScenePerception.html), but neither Scene Planes nor Scene Meshes are retrieved. The whole process works with the WVR_Success result, but at the end I don't get any data. Best regards Edited May 30 by Virtus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now