private void SetFirstFrame(UniGif.GifFile gif) { if (m_firstFrame == null) { m_firstFrame = gif.GetFirstFrame(); } }
/// <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); }