public void OnButtonPressed(VirtualButtonBehaviour vb) { Debug.Log("pressed " + vb); Debug.Log("language" + vb_app.languageSel); selectedLang = vb_app.languageSel; if (selectedLang == "EN") { Debug.Log("in eng"); if (descEN.activeSelf) { descEN.SetActive(false); QEN1.SetActive(true); VideoPlayerEN1.Play(); } if (QEN1.activeSelf) { VideoPlayerEN1.Pause(); QEN1.SetActive(false); QEN2.SetActive(true); VideoPlayerEN2.Play(); } else if (QEN2.activeSelf) { VideoPlayerEN2.Pause(); QEN2.SetActive(false); QEN3.SetActive(true); VideoPlayerEN3.Play(); } else if (QEN3.activeSelf) { VideoPlayerEN3.Pause(); QEN3.SetActive(false); revEN1.SetActive(true); } else if (revEN1.activeSelf) { revEN1.SetActive(false); revEN2.SetActive(true); } else if (revEN2.activeSelf) { revEN2.SetActive(false); QEN1.SetActive(true); VideoPlayerEN1.Play(); } else { } } if (selectedLang == "HN") { Debug.Log("in hindi"); if (descHN.activeSelf) { descHN.SetActive(false); QHN.SetActive(true); VideoPlayerHN.Play(); } else if (QHN.activeSelf) { VideoPlayerHN.Pause(); QHN.SetActive(false); revHN1.SetActive(true); } else if (revHN1.activeSelf) { revHN1.SetActive(false); revHN2.SetActive(true); } else if (revHN2.activeSelf) { revHN2.SetActive(false); QHN.SetActive(true); VideoPlayerHN.Play(); } else { } } if (selectedLang == "KN") { Debug.Log("in kan"); if (descKN.activeSelf) { descKN.SetActive(false); QKN.SetActive(true); VideoPlayerKN.Play(); } else if (QKN.activeSelf) { VideoPlayerKN.Pause(); QKN.SetActive(false); revKN1.SetActive(true); } else if (revKN1.activeSelf) { revKN1.SetActive(false); revKN2.SetActive(true); } else if (revKN2.activeSelf) { revKN2.SetActive(false); QKN.SetActive(true); VideoPlayerKN.Play(); } else { } } if (selectedLang == "TL") { Debug.Log("in tel"); if (descTL.activeSelf) { descTL.SetActive(false); QTL.SetActive(true); VideoPlayerTL.Play(); } else if (QTL.activeSelf) { VideoPlayerTL.Pause(); QTL.SetActive(false); revTL1.SetActive(true); } else if (revTL1.activeSelf) { revTL1.SetActive(false); revTL2.SetActive(true); } else if (revTL2.activeSelf) { revTL2.SetActive(false); QTL.SetActive(true); VideoPlayerTL.Play(); } else { } } }
protected virtual void OnTrackingFound() { Debug.Log("language" + vb_app.languageSel); selectedLang = vb_app.languageSel; if (selectedLang == "EN") { QHN.SetActive(false); QKN.SetActive(false); QTL.SetActive(false); revHN1.SetActive(false); revHN2.SetActive(false); revKN1.SetActive(false); revKN2.SetActive(false); revTL1.SetActive(false); revTL2.SetActive(false); descHN.SetActive(false); descKN.SetActive(false); descTL.SetActive(false); if (QEN1.activeSelf == false && QEN2.activeSelf == false && QEN3.activeSelf == false && revEN1.activeSelf == false && revEN2.activeSelf == false) { Debug.Log("putting desc"); descEN.SetActive(true); } if (QEN1.activeSelf) { VideoPlayerEN1.Play(); } if (QEN2.activeSelf) { VideoPlayerEN2.Play(); } if (QEN3.activeSelf) { VideoPlayerEN3.Play(); } } else if (selectedLang == "HN") { QEN1.SetActive(false); QEN2.SetActive(false); QEN3.SetActive(false); QKN.SetActive(false); QTL.SetActive(false); revEN1.SetActive(false); revEN2.SetActive(false); revKN1.SetActive(false); revKN2.SetActive(false); revTL1.SetActive(false); revTL2.SetActive(false); descEN.SetActive(false); descKN.SetActive(false); descTL.SetActive(false); if (QHN.activeSelf == false && revHN1.activeSelf == false && revHN2.activeSelf == false) { descHN.SetActive(true); } if (QHN.activeSelf) { VideoPlayerHN.Play(); } } else if (selectedLang == "KN") { QEN1.SetActive(false); QEN2.SetActive(false); QEN3.SetActive(false); QHN.SetActive(false); QTL.SetActive(false); revEN1.SetActive(false); revEN2.SetActive(false); revHN1.SetActive(false); revHN2.SetActive(false); revTL1.SetActive(false); revTL2.SetActive(false); descEN.SetActive(false); descHN.SetActive(false); descTL.SetActive(false); if (QKN.activeSelf == false && revKN1.activeSelf == false && revKN2.activeSelf == false) { descKN.SetActive(true); } if (QKN.activeSelf) { VideoPlayerHN.Play(); } } else if (selectedLang == "TL") { QEN1.SetActive(false); QEN2.SetActive(false); QEN3.SetActive(false); QKN.SetActive(false); QHN.SetActive(false); revEN1.SetActive(false); revEN2.SetActive(false); revKN1.SetActive(false); revKN2.SetActive(false); revHN1.SetActive(false); revHN2.SetActive(false); descEN.SetActive(false); descKN.SetActive(false); descHN.SetActive(false); if (QTL.activeSelf == false && revTL1.activeSelf == false && revTL2.activeSelf == false) { descTL.SetActive(true); } if (QTL.activeSelf) { VideoPlayerTL.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; } } }