public void Clear() { _ClipData = null; _ClipButtonImage.texture = null; _ClipButton.GetComponent <Image>().color = Color.white; _ClipButtonText.enabled = true; _State = ClipPadState.Empty; }
public void OnClipPreviewComplete(Texture2D previewTexture) { _ClipData._PreviewImg = previewTexture; //NFI why this is needed, but otherwise randomly half of the preview images won't render on the pad UI _ClipData._PreviewImg.LoadImage(previewTexture.EncodeToPNG()); //If we're previewing, not loading from serialised, initialise the clipdata for first run _ClipData._VideoLengthMs = _Manager._PreviewPlayer.Info.GetDurationMs(); _ClipData.InitSettings(); _State = ClipPadState.Loaded; RefreshUI(); }
public void LoadFromClipData(ProjectClip clipData) { _ClipData = clipData; _State = ClipPadState.Loaded; RefreshUI(); }