My Project
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
ProGifPlayerComponent Class Referenceabstract
Inheritance diagram for ProGifPlayerComponent:
ProGifPlayerImage ProGifPlayerRawImage ProGifPlayerRenderer

Classes

class  FirstGifFrame
 

Public Types

enum  DisplayType {
  None = 0 , Image , Renderer , GuiTexture ,
  RawImage
}
 
enum  PlayerState {
  None , Loading , Ready , Playing ,
  Pause
}
 This component state.
 

Public Member Functions

void SetState (PlayerState state)
 
virtual void Play (RenderTexture[] gifFrames, int fps, bool isCustomRatio, int customWidth, int customHeight, bool optimizeMemoryUsage)
 Setup to play the stored textures from gif recorder.
 
void Pause ()
 
void Resume ()
 
void Stop ()
 
void _OnFirstFrameReady (GifTexture gifTex)
 
void SetOnFirstFrameCallback (Action< FirstGifFrame > onFirstFrame)
 
void SetLoadingCallback (Action< float > onLoading)
 
void SetOnPlayingCallback (Action< GifTexture > onPlayingCallback)
 
bool ByteArrayToFile (string fileName, byte[] byteArray)
 
virtual void Clear ()
 

Public Attributes

List< GifTexturegifTextures = new List<GifTexture>()
 
DisplayType displayType = DisplayType.None
 
float nextFrameTime = 0.0f
 
int spriteIndex = 0
 
bool optimizeMemoryUsage = true
 Set to 'true' to take advantage of the highly optimized ProGif playback solution for significantly save the memory usage.
 
Action< FirstGifFrameOnFirstFrame = null
 
Action< float > OnLoading = null
 
Action< GifTextureOnPlayingCallback = null
 

Protected Member Functions

abstract void _OnFrameReady (GifTexture gTex, bool isFirstFrame)
 This is called on every gif frame decode finish.
 
void _ClearGifTextures (List< GifTexture > gifTexList)
 Clear the sprite & texture2D in the list of GifTexture.
 

Properties

bool ignoreTimeScale [get, set]
 
float interval [get]
 Get the current frame waiting time.
 
float playbackSpeed [get, set]
 Get/Set the playback speed of the GIF. (Default is 1.0f)
 
float LoadingProgress [get]
 Gets the progress when load Gif from path/url.
 
bool IsLoadingComplete [get]
 
PlayerState State [get]
 Current state.
 
int loopCount [get]
 Animation loop count (0 is infinite)
 
int width [get]
 Texture width (px)
 
int height [get]
 Texture height (px)
 

Member Function Documentation

◆ _OnFrameReady()

abstract void ProGifPlayerComponent._OnFrameReady ( GifTexture  gTex,
bool  isFirstFrame 
)
protectedpure virtual

This is called on every gif frame decode finish.

Parameters
gTexGifTexture.

Implemented in ProGifPlayerImage, ProGifPlayerRawImage, and ProGifPlayerRenderer.

◆ Play()

virtual void ProGifPlayerComponent.Play ( RenderTexture[]  gifFrames,
int  fps,
bool  isCustomRatio,
int  customWidth,
int  customHeight,
bool  optimizeMemoryUsage 
)
inlinevirtual

Setup to play the stored textures from gif recorder.

Reimplemented in ProGifPlayerImage, ProGifPlayerRawImage, and ProGifPlayerRenderer.

Property Documentation

◆ LoadingProgress

float ProGifPlayerComponent.LoadingProgress
get

Gets the progress when load Gif from path/url.

The loading progress.


The documentation for this class was generated from the following file: