public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus) { selectedLang = vb_app.languageSel; if (newStatus == TrackableBehaviour.Status.DETECTED || newStatus == TrackableBehaviour.Status.TRACKED || newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) { Debug.Log("Image Found"); if (q1.activeSelf && selectedLang == "EN") { Debug.Log("Video1" + selectedLang); VideoPlayer.Play(); } else if (q2.activeSelf && selectedLang == "EN") { Debug.Log("Video2"); VideoPlayer2.Play(); } else if (q3.activeSelf && selectedLang == "EN") { Debug.Log("Video3"); VideoPlayer3.Play(); } } else { Debug.Log("Lost Image"); VideoPlayer.Pause(); VideoPlayer2.Pause(); VideoPlayer3.Pause(); } }
public void OnButtonPressed(VirtualButtonBehaviour vb) { selectedLang = vb_app.languageSel; if (VideoPlayer.isPlaying) { VideoPlayer.Pause(); q1.SetActive(false); q2.SetActive(true); VideoPlayer2.Play(); } else if (VideoPlayer2.isPlaying) { VideoPlayer2.Pause(); q2.SetActive(false); q3.SetActive(true); VideoPlayer3.Play(); } else if (VideoPlayer3.isPlaying) { VideoPlayer3.Pause(); q3.SetActive(false); q1.SetActive(true); VideoPlayer.Play(); } else { VideoPlayer.Play(); } Debug.Log("Button pressed" + vb); //new WaitForSeconds(5); }