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

Geometry not working? (1.37) #121

Closed
mechpil0t opened this issue May 12, 2023 · 3 comments
Closed

Geometry not working? (1.37) #121

mechpil0t opened this issue May 12, 2023 · 3 comments

Comments

@mechpil0t
Copy link

I am testing out the latest version of the Geospatial API and in the sample scene (Samples/ARCore Extensions/1.37.0/Geospatial Same/Scenes/Geospatial) there is a toggle for Geometry. However when I toggle it on nothing happens (no errors either).

I added some debug logs to the geospatialcontroller.cs script, only the first is logged so I guess there nothing being added to the _addedStreetscapeGeometrys or _updatedStreetscapeGeometrys

lines 675-715

` if (_streetscapeGeometryVisibility)
{
// get access to ARstreetscapeGeometries in ARStreetscapeGeometryManager
if (StreetscapeGeometryManager)
{
StreetscapeGeometryManager.StreetscapeGeometriesChanged
+= (ARStreetscapeGeometrysChangedEventArgs) =>
{
_addedStreetscapeGeometrys =
ARStreetscapeGeometrysChangedEventArgs.Added;
_updatedStreetscapeGeometrys =
ARStreetscapeGeometrysChangedEventArgs.Updated;
_removedStreetscapeGeometrys =
ARStreetscapeGeometrysChangedEventArgs.Removed;
};
Debug.Log("geo 1");
}

                foreach (
                ARStreetscapeGeometry streetscapegeometry in _addedStreetscapeGeometrys)
                {
                    InstantiateRenderObject(streetscapegeometry);
					Debug.Log("geo 2");
                }

                foreach (
                    ARStreetscapeGeometry streetscapegeometry in _updatedStreetscapeGeometrys)
                {
                    // This second call to instantiate is required if geometry is toggled on
                    // or off after the app has started.
                    InstantiateRenderObject(streetscapegeometry);
                    UpdateRenderObject(streetscapegeometry);
					Debug.Log("geo 3");
                }

                foreach (
                ARStreetscapeGeometry streetscapegeometry in _removedStreetscapeGeometrys)
                {
                    DestroyRenderObject(streetscapegeometry);
                }
            }`

i have streetscape geometry enabled in the GeospatialConfig

is geometry only available in certain areas (we are in Tokyo)

@tkada
Copy link

tkada commented May 12, 2023

I have same issue.
ARStreetscapeGeometryManager.StreetscapeGeometriesChanged event is not called.
I tried tokyo and yokohama in japan.

@mechpil0t
Copy link
Author

fixed for me now

@mechpil0t
Copy link
Author

i should clarify, there was a similar issue on the arcore gold demo. after they mentioned this fix the geometry started working for me on the standard sample - i rebuilt my app - not sure if that helped
google-ar/demo-megagolf#1 (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

2 participants