oculus-samples / Unity-DepthAPI

Examples of using Depth API for real-time, dynamic occlusions
Other
167 stars 24 forks source link

Didnt work with SDKv62? #29

Closed Spphire closed 3 months ago

Spphire commented 4 months ago

I have 2 projects with SDKv60 and v62. Depthapi works well in SDKv60 but not in v62. The model remains transparent all the time. I dont know why but the version of SDK seems the only difference between them

TudorJude commented 3 months ago

Hey Spphire,

Sorry for the delayed response, could you please tell me the version of Unity you are running?

Thanks

Spphire commented 3 months ago

Hey Spphire,

Sorry for the delayed response, could you please tell me the version of Unity you are running?

Thanks

2022.3.15 and my quest3 system is v63

TudorJude commented 3 months ago

I'm trying to reproduce it, in the meantime, could you please delete your Library folder and try to build again?

Spphire commented 3 months ago

I'm trying to reproduce it, in the meantime, could you please delete your Library folder and try to build again?

If you meant to delete the "Library" folder in the project's root path, it doesn't work for me after rebuilding after that.

TudorJude commented 3 months ago

Can you supply any logs? Try removing your app from the device before reinstalling it to clear all caches. I've been trying to reproduce it, but have had no luck so far.

Spphire commented 3 months ago

Can you supply any logs? Try removing your app from the device before reinstalling it to clear all caches. I've been trying to reproduce it, but have had no luck so far.

Logs for what, I'm new to Android platform development ><

TudorJude commented 3 months ago

There's a tool that comes pre-installed with Unity, called adb. You need to add this to your Environment Variables so that you can use it in command line. Then you can type in the "logcat" command. This command 'adb logcat > out.txt' will put out the logs from your device into an out.txt file. Alternatively, Unity has this package but I am unfamiliar with it. https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@0.1/manual/index.html

Spphire commented 3 months ago

There's a tool that comes pre-installed with Unity, called adb. You need to add this to your Environment Variables so that you can use it in command line. Then you can type in the "logcat" command. This command 'adb logcat > out.txt' will put out the logs from your device into an out.txt file. Alternatively, Unity has this package but I am unfamiliar with it. https://docs.unity3d.com/Packages/com.unity.mobile.android-logcat@0.1/manual/index.html

image I got it! v60sdk will ask to enable experimental features when building the project but not v62sdk, even I enable the experimental features image

Spphire commented 3 months ago

But after I ran the command below, it still doesn't work

adb shell setprop debug.oculus.experimentalEnabled 1
TudorJude commented 3 months ago

That shouldn't be it, Depth API is now out of experimental. Something else is wrong with your project. If you could send some logs, I could see get a better idea as to what's happening in your project.

TudorJude commented 3 months ago

Wait, I just noticed one of the logs you posted here. Can you please check if you have the scene permission enabled for your app? That's something you have to do yourself app-side. To check if your app has scene permission enabled, go to your quest's settings area, under permissions, and check if spatial data is enabled for your Depth API enabled app.

To ebable scene permission, you can write code to do that, or set the "Scene" tickbox on your OVR camera: image

Spphire commented 3 months ago

Wait, I just noticed one of the logs you posted here. Can you please check if you have the scene permission enabled for your app? That's something you have to do yourself app-side. To check if your app has scene permission enabled, go to your quest's settings area, under permissions, and check if spatial data is enabled for your Depth API enabled app.

To ebable scene permission, you can write code to do that, or set the "Scene" tickbox on your OVR camera: image

That's the point! Thank you so much!