void Start()
    {
        vuMarkManager = TrackerManager.Instance.GetStateManager().GetVuMarkManager();
        for (int i = 0; i <= MAX_TRACKER_ID; i++)
        {
            trackers[i] = new TrackerState(i);
        }

        vuMarkManager.RegisterVuMarkDetectedCallback(target =>
        {
            // If necessary, here we can access the new VuMarkTarget (determine ID).
            // But the VuMarkBehavior is not available yet.
            var tracker = GetTrackerFromTarget(target);
            if (tracker != null && tracker.id == centerTrackerId)
            {
                // Center tracker is automatically registered to the origin.
                tracker.isRegistered       = true;
                tracker.knownWorldPosition = Vector3.zero;
            }
        });
        vuMarkManager.RegisterVuMarkBehaviourDetectedCallback(behavior =>
        {
            // If necessary, here we can access the assigned VuMarkBehavior.
            // But the VuMarkTarget is not available yet.
        });
    }
Пример #2
0
    void Start()
    {
        mIdPanel = GetComponent <PanelShowHide>();

        // register callbacks to VuMark Manager
        mVuMarkManager = TrackerManager.Instance.GetStateManager().GetVuMarkManager();
        mVuMarkManager.RegisterVuMarkDetectedCallback(OnVuMarkDetected);
        mVuMarkManager.RegisterVuMarkLostCallback(OnVuMarkLost);
        mVuMarkManager.RegisterVuMarkBehaviourDetectedCallback(OnBehaviourDetected);
    }
Пример #3
0
    private void Awake()
    {
        //Increase the number of targets that can be detected simulateously
        VuforiaConfiguration.Instance.Vuforia.MaxSimultaneousImageTargets = 10;
        VuMarkManager vumarkManager = TrackerManager.
                                      Instance.GetStateManager().GetVuMarkManager();

        //Register the method managing the appearance of new VuMarkBehaviours
        vumarkManager.RegisterVuMarkBehaviourDetectedCallback(OnVuMarkBehaviourFound);
    }