public void ClosePlaybackPanel() { clipPlayer.Stop(); playbackPanel.transform.DOScale(Vector3.zero, 0.5f); playbackPanel.SetActive(false); isPlaying = false; }
void LoadStaticImage() { #if EASY_MOBILE clipPlayerComp.Stop(); #endif if (ImgTex != null) { noImageMsg.SetActive(false); Sprite sprite = Sprite.Create(ImgTex, new Rect(0.0f, 0.0f, ImgTex.width, ImgTex.height), new Vector2(0.5f, 0.5f)); Transform imgTf = staticImage.gameObject.transform; RectTransform imgRtf = staticImage.GetComponent <RectTransform>(); float scaleFactor = 1; if (scaleMode == ScaleMode.AutoHeight) { scaleFactor = imgRtf.rect.width / sprite.rect.width; } else { scaleFactor = imgRtf.rect.height / sprite.rect.height; } staticImage.sprite = sprite; staticImage.SetNativeSize(); imgTf.localScale = imgTf.localScale * scaleFactor; ScaleContainer(sprite.rect.width / sprite.rect.height); } else { noImageMsg.SetActive(true); } clipPlayer.SetActive(false); staticImage.gameObject.SetActive(true); }
public void ClosePlaybackPanel() { clipPlayer.Stop(); playbackPanel.SetActive(false); }
public void OpenGifGenerationDemo() { decodedClipPlayer.Stop(); gifPlayingPanel.SetActive(false); }