• YouTube
  • Vimeo
  • RSS

TextureSequence

Public properties: 

Texture2D activeTexture [Read only]

Link to the texture of the frame, which is now showing.

float duration [Read / Write]

Length of the animation in seconds. The value must be greater than zero.

int frame [Read / Write]

Number of the current frame.

The numbering starts from zero.

int length [Read only]

Number of images.

TextureSequenceLoop loop [Read / Write]

Type repeating animation. Can be: None, Loop, PingPong.

int materialID [Read / Write]

ID material in which to display the image.

Valid only if selected as the target material.

float progress [Read only]

Current progress animation.

Values ​​can be from 0 to 1.

float speed [Read / Write]

The time factor.

TextureSequenceTarget target [Read / Write]

Component, in which to display the image. Can be: GUITexture or Material

GameObject targetObject [Read / Write]

GameObject, in which to display the image.

string textureName [Read / Write]

The parameter name of the material on which to display the image. Valid only if selected as the target material.

static bool isReadableTexture(Texture2D texture)

Checks enabled a texture parameter «Read / Write Enabled».

float time [Read only]

Current time.

Public static methods: 

static Texture2D[] ConvertAtlasToTextures(Texture2D atlasTexture, TextAsset atlasSettings, Vector2 originalImageSize)

Converts texture atlas to array Texture2D.

static TextureSequence CreateAndPlay (GameObject target, string texturesPath, float duration, float speed, TextureSequenceLoop loop)

Creates a new instance of the «TextureSequence», puts it to the specified GameObject, loads the textures in the path relative to the folder «Resources», sets the parameters for the playback and returns the newly created instance.

static TextureSequence CreateAndPlay (GameObject target, Object[] textures, float duration, float speed, TextureSequenceLoop loop)

Creates a new instance of the «TextureSequence», puts it to the specified GameObject, gives texture and playback options, and returns the newly created instance.

static TextureSequence CreateAndPlay (GameObject target, Texture2D atlasTexture, TextAsset atlasSettings, Vector2 originalImageSize, float duration, float speed, TextureSequenceLoop loop)

Creates a new instance of the «TextureSequence», puts it to the specified GameObject, sets atlas of textures and play options, and returns the newly created instance.

static TextureSequence CreateAndPlay(GameObject target, Texture2D atlasTexture, string atlasSettingsPath, Vector2 originalImageSize, float duration, float speed, TextureSequenceLoop loop)

Creates a new instance of the «TextureSequence», puts it to the specified GameObject, sets atlas of textures and play options, and returns the newly created instance. Atlas settings are automatically loaded on the way «settingsPath», relative to the folder «Resources».

static Texture2D GetTextureFromAtlas(Texture2D atlasTexture, TextAsset atlasSettings, Vector2 originalImageSize, uint textureIndex)

Get texture from atlas by index.

static Texture2D GetTextureFromAtlas(Texture2D atlasTexture, TextAsset atlasSettings, Vector2 originalImageSize, string textureName)

Get texture from atlas by name.

static bool isReadableTexture(Texture2D texture)

Checks enabled a texture parameter «Read / Write Enabled».

Public methods: 

Texture2D GetTextureFromAtlas(uint textureIndex)

Get texture from current atlas by index.

Texture2D GetTextureFromAtlas(string textureName)

Get texture from current atlas by name.

void Load (string Path)

Load all images in the path relative to the folder «Resources».

void LoadAndPlay (string path)

Load all images in the path relative to the folder «Resources» and starts the animation.

void LoadAndPlay (string path, int FRAME)

Load all images in the path relative to the folder «Resources» and starts playback from the specified frame.

void LoadAndPlay (string path, float Duration, float Speed)

Load all images in the path relative to the folder «Resources», sets the duration and speed, and starts playback.

void LoadAndPlay (string path, float Duration, float Speed, TextureSequenceLoop Loop)

Load all images in the path relative to the folder «Resources», sets the duration, speed, type of recurrence, and starts playback.

void Play ()

Starts playing the animation.

void Play (int FRAME)

Starts playing the animation at the specified frame.

void SetAtlas (Texture2D texture, TextAsset settings, Vector2 originalTextureSize)

Sets the texture atlas as the source image.

void SetAtlas (Texture2D texture, string settingsPath, Vector2 originalTextureSize)

Sets the texture atlas as the source image. Atlas settings are automatically loaded on the way «settingsPath», relative to the folder «Resources».

void SetAtlasAndPlay (Texture2D texture, TextAsset settings, Vector2 originalTextureSize)

Sets the texture atlas as the source image, and starts playing the animation.

void SetAtlasAndPlay (Texture2D texture, TextAsset settings, Vector2 originalTextureSize, float Duration, float Speed)

Sets the texture atlas as the source image, sets the duration and speed, and starts playing the animation.

void SetAtlasAndPlay (Texture2D texture, TextAsset settings, Vector2 originalTextureSize, float Duration, float Speed, TextureSequenceLoop Loop)

Sets the texture atlas as the source image, sets the length, speed and type of recurrence, and starts playing the animation.

void SetAtlasAndPlay (Texture2D texture, string settingsPath, Vector2 originalTextureSize)

Sets the texture atlas as the source image, and starts playing the animation. Atlas settings are automatically loaded on the way «settingsPath», relative to the folder «Resources».

void SetAtlasAndPlay (Texture2D texture, string settingsPath, Vector2 originalTextureSize, float Duration, float Speed)

Sets the texture atlas as the source image, sets the duration and speed, and starts playing the animation. Atlas settings are automatically loaded on the way «settingsPath», relative to the folder «Resources».

void SetAtlasAndPlay (Texture2D texture, string settingsPath, Vector2 originalTextureSize, float Duration, float Speed, TextureSequenceLoop Loop)

Sets the texture atlas as the source image, sets the length, speed and type of recurrence, and starts playing the animation. Atlas settings are automatically loaded on the way «settingsPath», relative to the folder «Resources».

void SetTextures (Object[] newTextures)

Sets the texture animation.

void SetTexturesAndPlay (Object[] newTextures)

Sets the texture animation and the animation begins.

void SetTexturesAndPlay (Object[] newTextures, float Duration, float Speed)

Sets the texture animation, sets the duration and speed, and starts playing the animation.

void SetTexturesAndPlay (Object[] newTextures, float Duration, float Speed, TextureSequenceLoop Loop)

Sets the texture animation, sets the duration, speed and type of recurrence, and starts playing the animation.

void Stop ()

Stop motion animation.

Public events: 

OnComplete ()

This occurs when the animation stopped.

OnLoop ()

This occurs when the animation starts over, or in reverse order.

OnUpdate ()

Occurs every time a changed frame of animation.

Login

Please login using your credentials recived by email when you register.

I forgot my password | Resend activation e-mail

×