Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile in Unity v2019.3 > several scripts are missing #4

Closed
yearofthewhopper opened this issue Jun 25, 2020 · 9 comments
Closed
Assignees

Comments

@yearofthewhopper
Copy link

yearofthewhopper commented Jun 25, 2020

This is the output after importing using the arcore sdk in unity with the realism examples. Project won't compile past this and i checked to make sure all the scripts were imported. (none of the below scripts are included in this repo)

Assets/ARRealismDemos/Common/Scripts/AttachDepthTexture.cs(64,27): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
Assets/ARRealismDemos/Common/Scripts/DepthTextureController.cs(90,27): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
Assets/ARRealismDemos/Common/Scripts/DepthVisualizationEffect.cs(130,27): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
Assets/ARRealismDemos/Common/Scripts/AttachDepthTextureToMaterial.cs(83,27): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
Assets/ARRealismDemos/Common/Scripts/NoticeHelper.cs(101,22): error CS0117: 'Session' does not contain a definition for 'IsDepthModeSupported'
Assets/ARRealismDemos/Common/Scripts/NoticeHelper.cs(101,43): error CS0103: The name 'DepthMode' does not exist in the current context
Assets/ARRealismDemos/ScreenSpaceDepthMesh/Scripts/DepthPulseEffect.cs(213,27): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
Assets/ARRealismDemos/CollisionDetection/Scripts/FreeSpaceRenderer.cs(157,35): error CS0117: 'Frame.CameraImage' does not contain a definition for 'UpdateDepthTexture'
@ruofeidu ruofeidu self-assigned this Jun 25, 2020
@ruofeidu
Copy link
Collaborator

ruofeidu commented Jun 25, 2020

Thank you for your interest in Depth Lab!

Would you mind confirming that your ARCore SDK is v1.18.0? I have just followed our instructions and built Depth Lab with https://github.com/google-ar/arcore-unity-sdk/releases/tag/v1.18.0 using Unity 2018.4. Please let me know if you encounter any issues by providing details of your platform, Unity version, and ARCore version. Thank you!

@yearofthewhopper
Copy link
Author

@ruofeidu yes I am using ARCore SDK is v1.18.0 in 2019.3v Unity. The same issue persists.

@ruofeidu
Copy link
Collaborator

Thank you for your report! We are investigating this.

It looks like your ARCore SDK is not v1.18.0 to me. Frame.CameraImage.UpdateDepthTexture is a newly added API in ARCore 1.18:

* Added [`Frame.UpdateDepthTexture()`](https://developers.google.com/ar/reference/unity/class/GoogleARCore/Frame/CameraImage#updatedepthtexture) to update the input texture using the latest depth data from ARCore.

Would you like to build Depth Lab with Unity 2018.4 and reimport https://github.com/google-ar/arcore-unity-sdk/releases/download/v1.18.0/arcore-unity-sdk-1.18.0.unitypackage? Thank you so much!

@yearofthewhopper
Copy link
Author

This is the output error now that I have double checked that my ARCore SDK is v1.18.0 and recompiled

(Filename: Assets/ARRealismDemos/Common/Scripts/DepthSource.cs Line: 155)

NullReferenceException: Object reference not set to an instance of an object
  at DepthSource.get_DepthTexture () [0x00014] in MYUSERPATH/Downloads/arcore-depth-lab-master 2/Assets/ARRealismDemos/Common/Scripts/DepthSource.cs:155

@ruofeidu
Copy link
Collaborator

Is this a runtime error?
Would you like to make sure to set the Build Platform to Android? Thank you!

@yearofthewhopper
Copy link
Author

thank you! This worked. I have set my platform to android and built only for android and was able to compile. Though I don't have an android device so I was unable to test this all the way through. Any thoughts on utilizing the cross platform ability of unity to make it so these examples can compile for iOS or is that not possible?

@ruofeidu
Copy link
Collaborator

Glad that you have fixed this issue! Currently, Depth Lab only works in ARCore without the support of instant preview, while I do believe our library can be made available in iOS with depth maps (latest iPad Pro).

@yearofthewhopper
Copy link
Author

i can confirm that this does not compile for latest iPad Pro either, unfortunately. screenshot of result on iPad Pro link with supported devices
shows which leads to a misleading link that states that "all arcore features" work with this device. @ruofeidu

@fredsa
Copy link
Collaborator

fredsa commented Jun 26, 2020

@yearofthewhopper Thanks for the feedback. We're updating the documentation to be more clear w.r.t. device support. See #3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants