Skip to content
This repository was archived by the owner on Sep 14, 2021. It is now read-only.
This repository was archived by the owner on Sep 14, 2021. It is now read-only.

Image TrackingState.Paused does not instantly work #468

Description

@dv-dt-spal

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

  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions