protected virtual void OnTrackingLost()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Disable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = false;
            }

            // Disable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = false;
            }

            // Disable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = false;
            }
        }
    }
示例#2
0
 void StartUpdateData()
 {
     ITrackingUI[] uis = mTrackableBehaviour.GetComponentsInChildren <ITrackingUI>();
     Debug.LogError(uis.Length);
     foreach (ITrackingUI obj in uis)
     {
         obj.StartUpdateValue();
     }
 }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            VideoPlayer player = GetComponentInChildren <VideoPlayer>();
            player.Play();
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            translate();

            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);
            var textHandlers       = mTrackableBehaviour.GetComponentsInChildren <TextHandler>(true);


            // Update insertTextHandler
            foreach (var component in textHandlers)
            {
                insertTextHandler.currentWall = component.targetImageEnum;
            }

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    private void OnTrackingFound()
    {
        Renderer[] rendererComponents = GetComponentsInChildren <Renderer>(true);
        Collider[] colliderComponents = GetComponentsInChildren <Collider>(true);

        // Enable rendering:
        foreach (Renderer component in rendererComponents)
        {
            component.enabled = true;
        }

        // Enable colliders:
        foreach (Collider component in colliderComponents)
        {
            component.enabled = true;
        }

        // I have added this code to restart animation when marker found

        Animation[] array = mTrackableBehaviour.GetComponentsInChildren <Animation>(true);
        foreach (Animation r in array)
        {
            r.Play("Take 001");
            r.Stop();
            Debug.Log("animation name: " + r.name);
        }

        // Enable rendering:
        foreach (Renderer component in rendererComponents)
        {
            if (component.name != "Video" && component.name != "Icon")
            {
                component.enabled = true;
            }
        }

        if (mTrackableBehaviour.gameObject.GetComponentInChildren <AudioSource>() != null)
        {
            mTrackableBehaviour.gameObject.GetComponentInChildren <AudioSource>().Play();
        }

        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");
    }
示例#7
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }


        //Helps identify the respective Image Target and load the corresponding Content
        //Also Helps in tracking data for the purpose of Gamification
        if (mTrackableBehaviour.TrackableName == "watercycle")
        {
            watercycle.SetActive(true);
            monitorActivity.userLearnCounter("WC");
        }

        if (mTrackableBehaviour.TrackableName == "jallianwala")
        {
            jallian.SetActive(true);
            monitorActivity.userLearnCounter("JWB");
        }

        if (mTrackableBehaviour.TrackableName == "heart")
        {
            heart.SetActive(true);
            monitorActivity.userLearnCounter("HRT");
        }

        if (mTrackableBehaviour.TrackableName == "caeser")
        {
            caeser.SetActive(true);
            monitorActivity.userLearnCounter("CSR");
        }

        if (mTrackableBehaviour.TrackableName == "Coronavirus")
        {
            covid.SetActive(true);
            monitorActivity.userLearnCounter("CVD");
        }
    }
示例#8
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }


            Marker_active.gameObject.SetActive(true);
            Marker_deactive.gameObject.SetActive(false);
            Info_active.gameObject.SetActive(true);
            Info_deactive.gameObject.SetActive(false);
            pfeilnachoben.gameObject.SetActive(true);
            achivment_disable.gameObject.SetActive(false);
        }
    }
示例#9
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            if (paused == true)
            {
                AudioObj.UnPause();
            }
            panelUI.SetActive(true);
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
示例#10
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
        //objectObtainedPanel.GetComponent<DragSystem>().enabled = true;
        panel.SetActive(true);
        //MixerManager.SetUp();
        s.Play();
    }
示例#11
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            indiceImagem = Convert.ToInt32(mTrackableBehaviour.TrackableName);//Placa ta dando erro aki


            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
示例#12
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            if (UiCanvasManager.Instance.currentState == UiCanvasManager.GameState.ScanQrScreen)
            {
                UiCanvasManager.Instance.ChangeState(UiCanvasManager.Instance.lastRecentState);
            }
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound()
    {
        MarcoReviewENG.Play();
        MarcoReviewITA.Play();
        MarcoReviewHINDI.Play();
        AasthaReviewENG.Play();
        AasthaReviewITA.Play();
        AasthaReviewHINDI.Play();

        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound()

    {
        if (videoPlayer)
        {
            videoPlayer.Play();
            videoPlayer2.Stop();
            videoPlayer3.Stop();
        }
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
            if (audioSource)
            {
                audioSource.Play();
            }
            RaiseOnTargetFounded();
        }
    }
示例#16
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }

            if (pictureScreen.gameObject.activeSelf == false)
            {
                centerScreenClip.Play();
                clusterScreenClip.Play();
            }
        }
    }
示例#17
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }

        // 以下追加
        if (mTrackableBehaviour.gameObject.GetComponentInChildren <VideoPlayer>() != null)
        {
            mTrackableBehaviour.gameObject.GetComponentInChildren <VideoPlayer>().Play();
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);
            videoPlayer.Play();
            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }

            ButtonAction.gameObject.SetActive(true);
            target_text.gameObject.SetActive(true);
            panel.gameObject.SetActive(true);

            ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { videoPlayer.Stop(); videoPlayer.Play(); });
        }
    }
示例#19
0
    protected virtual void OnTrackingFound()
    {
        halo1.enabled = true;
        halo2.enabled = true;
        halo3.enabled = true;
        halo4.enabled = true;
        halo5.enabled = true;
        halo6.enabled = true;
        LightFlickering.Play();

        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
示例#20
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            manager.SendMessage("TrackFound", mTrackableBehaviour.TrackableName);

            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound() //ketika marker di scan
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }

        gameObject.GetComponent <AudioSource>().Play();
    }
    protected virtual void OnTrackingFound()
    {
        Debug.Log("Target Found: LOAD ASSETS");
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);
            Debug.Log("Renderer: " + rendererComponents + "\nCollider: " + colliderComponents + "\nCanvas: " + canvasComponents);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                Debug.Log("Component: " + component);
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }

        if (OnTargetFound != null)
        {
            OnTargetFound.Invoke();
        }
    }
        protected virtual void OnTrackingFound()
        {
            if (_trackableBehaviour)
            {
                ShowInfoScreen();

                var rendererComponents = _trackableBehaviour.GetComponentsInChildren <Renderer>(true);
                var colliderComponents = _trackableBehaviour.GetComponentsInChildren <Collider>(true);
                var canvasComponents   = _trackableBehaviour.GetComponentsInChildren <Canvas>(true);

                // Enable rendering:
                foreach (var component in rendererComponents)
                {
                    component.enabled = true;
                }

                // Enable colliders:
                foreach (var component in colliderComponents)
                {
                    component.enabled = true;
                }

                // Enable canvas':
                foreach (var component in canvasComponents)
                {
                    component.enabled = true;
                }
            }
        }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }

            targetFinderSprite.SetActive(false);

            // StartCoroutine(TurnOffTracking());
            ChangeUIStatus(true);
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }

            displayText.GetComponent <Text>().text = targetName.name;
            buttonText.GetComponent <Text>().text  = "More Information on\n" + targetName.name;

            Invoke("showPopUp", 5);
            popUpText.GetComponent <Text>().text = "Did You Recycle\n" + targetName.name + "?";
        }
    }
示例#26
0
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
        if (mTrackableBehaviour.TrackableName == "SHIP")
        {
            ship.SetActive(true);
        }
        if (mTrackableBehaviour.TrackableName == "AEROPLANE")
        {
            aeroplane.SetActive(true);
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }

        if (OnTargetFound != null)
        {
            OnTargetFound.Invoke();
        }
    }
        protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

                        //startAnim.Play("CINEMA_4D_Main");

                        // Enable rendering:
                        foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

                        // Enable colliders:
                        foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

                        // Enable canvas':
                        foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
        textObj.SetActive(false);
    }
    protected virtual void OnTrackingFound()
    {
        if (mTrackableBehaviour)
        {
            var rendererComponents = mTrackableBehaviour.GetComponentsInChildren <Renderer>(true);
            var colliderComponents = mTrackableBehaviour.GetComponentsInChildren <Collider>(true);
            var canvasComponents   = mTrackableBehaviour.GetComponentsInChildren <Canvas>(true);

            // Enable rendering:
            foreach (var component in rendererComponents)
            {
                component.enabled = true;
            }

            // Enable colliders:
            foreach (var component in colliderComponents)
            {
                component.enabled = true;
            }

            // Enable canvas':
            foreach (var component in canvasComponents)
            {
                component.enabled = true;
            }
        }
        StartCoroutine(introaudio());
    }