public void playVideo(string videoName) {
turnOffAllVideos();
gameObject.GetComponent().enabled = true;
foreach (GameObject videoGO in allVideos){
if (videoGO.name == videoName){
currentVideo = videoGO;
currentVideo.SetActive(true);
return;
}
}
Debug.LogWarning("Video not found: " + videoName);
}

Leave a Reply