示例#1
0
    void OnVuforiaStarted()
    {
        Debug.Log("OnVuforiaStarted() called.");

        m_StateManager = TrackerManager.Instance.GetStateManager();

        // Check trackers to see if started and start if necessary
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();
        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();

        if (m_PositionalDeviceTracker != null && m_SmartTerrain != null)
        {
            if (!m_PositionalDeviceTracker.IsActive)
            {
                m_PositionalDeviceTracker.Start();
            }
            if (m_PositionalDeviceTracker.IsActive && !m_SmartTerrain.IsActive)
            {
                m_SmartTerrain.Start();
            }
        }
        else
        {
            if (m_PositionalDeviceTracker == null)
            {
                Debug.Log("PositionalDeviceTracker returned null. GroundPlane not supported on this device.");
            }
            if (m_SmartTerrain == null)
            {
                Debug.Log("SmartTerrain returned null. GroundPlane not supported on this device.");
            }

            MessageBox.DisplayMessageBox(unsupportedDeviceTitle, unsupportedDeviceBody, false, null);
        }
    }
示例#2
0
    void OnVuforiaStarted()
    {
        Debug.Log("OnVuforiaStarted() called.");

        m_StateManager = TrackerManager.Instance.GetStateManager();

        // Check trackers to see if started and start if necessary
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();
        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();

        if (m_PositionalDeviceTracker != null && m_SmartTerrain != null)
        {
            if (!m_PositionalDeviceTracker.IsActive)
            {
                m_PositionalDeviceTracker.Start();
            }
            if (m_PositionalDeviceTracker.IsActive && !m_SmartTerrain.IsActive)
            {
                m_SmartTerrain.Start();
            }
            YiyouStaticDataManager.Instance.StartLoadABAssets();
        }
        else
        {
            SceneManager.LoadScene("wikiSLAM");
        }
    }
示例#3
0
    void OnVuforiaStarted()
    {
        Debug.Log("OnVuforiaStarted() called.");

        m_StateManager            = TrackerManager.Instance.GetStateManager();
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();
        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();
        if (m_PositionalDeviceTracker != null && m_SmartTerrain != null)
        {
            if (!m_PositionalDeviceTracker.IsActive)
            {
                m_PositionalDeviceTracker.Start();
            }
            if (m_PositionalDeviceTracker.IsActive && !m_SmartTerrain.IsActive)
            {
                m_SmartTerrain.Start();
            }
        }
        else
        {
            if (m_PositionalDeviceTracker == null)
            {
                Debug.Log("PositionalDeviceTracker returned null. GroundPlane not supported on this device.");
            }
            if (m_SmartTerrain == null)
            {
                Debug.Log("SmartTerrain returned null. GroundPlane not supported on this device.");
            }
        }
    }
示例#4
0
    public void ResetTrackers()
    {
        Debug.Log("ResetTrackers() called.");

        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();

        // Stop and restart trackers
        m_SmartTerrain.Stop();  // stop SmartTerrain tracker before PositionalDeviceTracker
        m_PositionalDeviceTracker.Reset();
        m_SmartTerrain.Start(); // start SmartTerrain tracker after PositionalDeviceTracker
    }
示例#5
0
    public void ResetTrackers()
    {
        Debug.Log("ResetTrackets() Called.");

        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();


        m_SmartTerrain.Stop();
        m_PositionalDeviceTracker.Stop();
        m_PositionalDeviceTracker.Start();
        m_SmartTerrain.Start();
    }
示例#6
0
    void OnVuforiaStarted()
    {
        Debug.Log("OnVuforiaStarted() called.");

        m_StateManager = TrackerManager.Instance.GetStateManager();

        // Check trackers to see if started and start if necessary
        m_PositionalDeviceTracker = TrackerManager.Instance.GetTracker <PositionalDeviceTracker>();
        m_SmartTerrain            = TrackerManager.Instance.GetTracker <SmartTerrain>();

        if (m_PositionalDeviceTracker != null && m_SmartTerrain != null)
        {
            if (!m_PositionalDeviceTracker.IsActive)
            {
                m_PositionalDeviceTracker.Start();
            }
            if (m_PositionalDeviceTracker.IsActive && !m_SmartTerrain.IsActive)
            {
                m_SmartTerrain.Start();
            }
        }
        else
        {
            if (m_PositionalDeviceTracker == null)
            {
                Debug.Log("PositionalDeviceTracker returned null. GroundPlane not supported on this device.");
            }
            if (m_SmartTerrain == null)
            {
                Debug.Log("SmartTerrain returned null. GroundPlane not supported on this device.");
            }

            MessageBox.DisplayMessageBox(unsupportedDeviceTitle, unsupportedDeviceBody, false, null);
        }
        m_ContentPositioningBehaviour = m_PlaneFinder.GetComponent <ContentPositioningBehaviour>();
        m_ContentPositioningBehaviour.DuplicateStage = false;
        SetMidAirMode(true);
    }