예제 #1
0
파일: GifDemo.cs 프로젝트: artemy0/Quiz
        public void ShowDemoGifFirstFrame()
        {
            decodedClipPlayer.gameObject.SetActive(true);

            if (string.IsNullOrEmpty(demoGifFilePath))
            {
                Debug.LogError("Couldn't file demo GIF file in persistentDataPath. Filepath: " + demoGifFilePath);
                return;
            }

            Gif.DecodeGif(demoGifFilePath, 1, decodeThreadPriority, clip =>
            {
                if (clip != null)
                {
                    decodedClip = clip;
                    clip.SetFilterMode(FilterMode.Point);
                    Gif.PlayClip(decodedClipPlayer, decodedClip);
                }
                else
                {
                    Debug.LogError("Error decoding GIF: received null AnimatedClip object.");
                }
            });
        }