Hi all,
I'm trying to return the time that has elapsed in the current animation for an object. I've done a little bit of searching but I seem to be running into errors.
Here is one forum thread that suggests using:
skeletonAnimation.state.GetCurrent(0).Time;
However I get an error that says:
'Track Entry' does not contain a definition for 'Time' and no extension method 'Time' accepting a first argument of type 'TrackEntry' could be found (are you missing a using directive or an assembly reference?)
In the Spine-Unity manual Spine-Unity Runtime Documentation I only see information about setting an animation to specific time, not telling unity to return the current elapsed time in an animation.
I've tried a few different lines that always return errors, but in particular I'm confused why the first line of code below works fine but the second does not:
float animDuration = myAnimation.Duration;
float animTime = myAnimation.Time;