public void Init(VideoSourceModel videoSource, SourceManager delayTime) { foreach (Transform item in content.transform) { Destroy(item.gameObject); } foreach (CamPoseModel model in videoSource.points) { GameObject go = Instantiate(camPoseObject); VideoButton videoButton = go.GetComponent <VideoButton>(); go.transform.SetParent(content.transform, false); videoButton.Init(model); } content.SetActive(false); string fileName = Application.persistentDataPath + "/Documents/video_" + videoSource.id + ".mp4"; if (!File.Exists(fileName)) { return; } videoPlayer.url = fileName; this.transform.rotation = Quaternion.Euler(0, -90, 0); }
private async Task ShowOptionsLayout() { await AttachButton.TranslateTo(0, 50, 0); await CameraButton.TranslateTo(50, 25, 0); await VideoButton.TranslateTo(50, 0, 0); AttachOptionLayout.IsVisible = true; var tasks = new Task[] { AttachButton.TranslateTo(0, 0, 300), CameraButton.TranslateTo(0, 0, 300), VideoButton.TranslateTo(0, 0, 300), ShowOptionsLayoutButton.RotateTo(45, 200), AttachOptionLayout.FadeTo(1, 200) }; await Task.WhenAll(tasks); }
private void VideoSectionAnimate() { VideoButton.Offset(offsetY: 40, duration: 0).Then().Fade(1).Offset().Start(); VideoDescription.Offset(offsetY: 40, duration: 0).Then().Fade(1).Offset().Start(); }
public void DestroyButton() { VideoButton.DestroyMe(); }