Exemplo n.º 1
0
 private void SetFirstFrame(UniGif.GifFile gif)
 {
     if (m_firstFrame == null)
     {
         m_firstFrame = gif.GetFirstFrame();
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Draws a GIF.
        /// </summary>
        /// <param name="gif">The GIF.</param>
        public static void DrawGIF(UniGif.GifFile gif)
        {
            var texture = gif.GetFirstFrame();

            if (texture == null)
            {
                Debug.LogWarning("Null texture passed!");
                return;
            }

            var rect = GetRectForTexture(texture);

            rect = rect.ForceBoth(texture.width, texture.height);

            gif.Draw(rect);
        }