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

Image TrackingState.Paused does not instantly work #468

Closed
dv-dt-spal opened this issue Dec 14, 2018 · 1 comment
Closed

Image TrackingState.Paused does not instantly work #468

dv-dt-spal opened this issue Dec 14, 2018 · 1 comment

Comments

@dv-dt-spal
Copy link

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?

@fredsa
Copy link

fredsa commented Jan 9, 2019

Duplicate of #299

@fredsa fredsa marked this as a duplicate of #299 Jan 9, 2019
@fredsa fredsa closed this as completed Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants