Log in or register to post comments

VuMark quick changes

July 15, 2018 - 12:10pm #1

Hello,

I designed a vumark which works well (recognizes quickly and tracks well).

Currently I'm using Vuforia for Unity (versions: Vuforia:7.2.20 Unity: 2018.1.0f2)

When I start the application and change vumarks quickly, camera stops and then Unity totally stops responding. (Same on android device and play mode)

Am I doing something wrong ?

 

Behaviour code added to Vumark element:

using System;

using System.Collections;

using System.Collections.Generic;

using System.Linq;

using UnityEngine;

using Vuforia;

public class MarkerNavigation : MonoBehaviour, ITrackableEventHandler

{

    private VuMarkManager VuMarkManager;

    private TrackableBehaviour mTrackableBehaviour;

    public VuMarkTarget VuMark;

    public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)

    {

        switch (newStatus)

        {

            case TrackableBehaviour.Status.DETECTED:

            case TrackableBehaviour.Status.TRACKED:

            case TrackableBehaviour.Status.EXTENDED_TRACKED:

                {

                    OnTrackingFound();

                }

                break;

            case TrackableBehaviour.Status.NO_POSE:

            default:

                {

                    OnTrackingLost();

                }

                break;

        }

    }

    private void OnTrackingLost()

    {

    }

    private void OnTrackingFound()

    {

        Guid markerId;

        VuMarkBehaviour behaviour;

        behaviour = VuMarkManager.GetActiveBehaviours().FirstOrDefault();

        if (behaviour != null)

        {

            VuMark = behaviour.VuMarkTarget;

            markerId = ToGuid(VuMark.InstanceId.HexStringValue);

            print(markerId);

        }

    }

    // Use this for initialization

    void Start () {

        VuMarkManager = TrackerManager.Instance.GetStateManager().GetVuMarkManager();

        mTrackableBehaviour = GetComponent<TrackableBehaviour>();

        if (mTrackableBehaviour)

        {

            mTrackableBehaviour.RegisterTrackableEventHandler(this);

        }

    }



// Update is called once per frame

void Update () {

 

}

    Guid ToGuid(string str)

    {

        return new Guid(str.Remove(0, 2));

    }

}

VuMark quick changes

August 16, 2018 - 6:04pm #3

Anybody ?

VuMark quick changes

July 16, 2018 - 3:47am #2

updates:

1. I'm changing vumarks in photoshop with CTRL+TAB while camera is pretty steady (not losing trackable)

2. Tried unity version 2018.2.0f2 is same

Log in or register to post comments