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

When the GeoSpatialArf5 sample scene is built and run, The following error appears: #164

Open
cinephile231 opened this issue Dec 19, 2023 · 1 comment

Comments

@cinephile231
Copy link

2023-12-19 18:58:55.486 20847 20874 Error Unity Geospatial sample encountered an ARSession error state None.
2023-12-19 18:58:55.486 20847 20874 Error Unity Please restart the app.
2023-12-19 18:58:55.486 20847 20874 Error Unity Google.XR.ARCoreExtensions.Samples.Geospatial.GeospatialController:ReturnWithReason(String)
2023-12-19 18:58:55.486 20847 20874 Error Unity Google.XR.ARCoreExtensions.Samples.Geospatial.GeospatialController:LifecycleUpdate()
2023-12-19 18:58:55.486 20847 20874 Error Unity Google.XR.ARCoreExtensions.Samples.Geospatial.GeospatialController:Update()

arcore foundation 5.11
arcore extension 1.4.1
Unity 2022.3.15

When the GeoSpatialArf5 sample scene is built and run,
The following error appears:
Are you branching properly?
What did I set up wrong?

@swardle
Copy link

swardle commented Jan 4, 2024

Maybe I know what happened. Did you opened GeoSpatialArf5 scene but and didn't have ARCORE_USE_ARF_5 defined then saved it.

The arf5 scene uses arf5 types from the sample code. These types only exist when built with ARCORE_USE_ARF_5 define. When Unity sees a value in the scene that it does not understand when you reserialize (ie you save) these new types become null.

Unfortunately when you don't define anything the sample code will default to ARF4.

To fix this situation.

  1. Start a new project using the arcore samples as your old scene file is corrupted.
  2. Do these steps before you open any scene (or at least don't save them)
    https://developers.google.com/ar/develop/unity-arf/update-to-ar-foundation-5
    The important bit is setting ARCORE_USE_ARF_5.
  3. Then use the Geospatial (or other arcore) samples like you would have before.

Did this address your problem

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

2 participants