This repository was archived by the owner on Sep 14, 2021. It is now read-only.
Description
SPECIFIC ISSUE ENCOUNTERED
TrackingState.Paused is very slow and the 3D asset created lingers even when image is not in view
VERSIONS USED
Unity: 2018.2.18f1
ARCore SDK for Unity: arcore-unity-sdk-v1.5.0
Device manufacturer, model, and O/S: Samsung Note 8 and Samsung Tab S3
ARCore:
On Windows, use: adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"
On macOS, use: adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:
Output of adb shell getprop ro.build.fingerprint:
STEPS TO REPRODUCE THE ISSUE
In the augmented image example destroy the associate gameobject with both paused and stopped state
` foreach (var image in m_TempAugmentedImages)
{
AugmentedImageVisualizer visualizer = null;
m_Visualizers.TryGetValue(image.DatabaseIndex, out visualizer);
if (image.TrackingState == TrackingState.Tracking && visualizer == null)
{
// Create an anchor to ensure that ARCore keeps tracking this augmented image.
Anchor anchor = image.CreateAnchor(image.CenterPose);
if(image.DatabaseIndex == 0)
visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab, anchor.transform);
else if(image.DatabaseIndex == 1)
visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab2, anchor.transform);
//else
// visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab3, anchor.transform);
visualizer.Image = image;
m_Visualizers.Add(image.DatabaseIndex, visualizer);
}
else if (image.TrackingState == TrackingState.Stopped && visualizer != null)
{
m_Visualizers.Remove(image.DatabaseIndex);
GameObject.DestroyImmediate(visualizer.gameObject);
}
else if (image.TrackingState == TrackingState.Paused && visualizer != null)
{
m_Visualizers.Remove(image.DatabaseIndex);
GameObject.DestroyImmediate(visualizer.gameObject);
}
}`
WORKAROUNDS (IF ANY)
No
ADDITIONAL COMMENTS
Any workaround to instantly know if the image is not being tracked by ARCore and destroy the marker associated gameobject?
Reactions are currently unavailable
SPECIFIC ISSUE ENCOUNTERED
TrackingState.Paused is very slow and the 3D asset created lingers even when image is not in view
VERSIONS USED
On Windows, use:
adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"On macOS, use:
adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:adb shell getprop ro.build.fingerprint:STEPS TO REPRODUCE THE ISSUE
In the augmented image example destroy the associate gameobject with both paused and stopped state
` foreach (var image in m_TempAugmentedImages)
{
AugmentedImageVisualizer visualizer = null;
m_Visualizers.TryGetValue(image.DatabaseIndex, out visualizer);
if (image.TrackingState == TrackingState.Tracking && visualizer == null)
{
// Create an anchor to ensure that ARCore keeps tracking this augmented image.
Anchor anchor = image.CreateAnchor(image.CenterPose);
if(image.DatabaseIndex == 0)
visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab, anchor.transform);
else if(image.DatabaseIndex == 1)
visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab2, anchor.transform);
//else
// visualizer = (AugmentedImageVisualizer)Instantiate(AugmentedImageVisualizerPrefab3, anchor.transform);
WORKAROUNDS (IF ANY)
No
ADDITIONAL COMMENTS
Any workaround to instantly know if the image is not being tracked by ARCore and destroy the marker associated gameobject?