2D Toolkit Forum

2D Toolkit => Support => Topic started by: hromoydron on June 26, 2013, 06:37:29 pm

Title: Clip Time
Post by: hromoydron on June 26, 2013, 06:37:29 pm
Hello!
How I can see time of the current clip in Animated Sprite?
anim.ClipTimeSeconds gives me current playing time, but I need all time.
Title: Re: Clip Time
Post by: unikronsoftware on June 26, 2013, 08:10:02 pm
Is it the clip length in seconds?
Remember the clip length only exists for non-looped clips.

float totalClipLength = anim.CurrentClip.frames.Length / anim.CurrentClip.fps;
Title: Re: Clip Time
Post by: hromoydron on June 26, 2013, 08:48:36 pm
yes. thank you!