# Animation Frame

**URL:** <https://discussions.unity.com/t/animation-frame/403201>\
**Category:** Animation\
**Tags:** Scripting\
**Created:** [December 6, 2009, 5:59pm UTC](https://discussions.unity.com/t/animation-frame/403201 "2009-12-06T17:59:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon\_93692923](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@anon\_93692923](https://discussions.unity.com/u/anon_93692923)\
**Post date:** [December 6, 2009, 5:59pm UTC](https://discussions.unity.com/t/animation-frame/403201/1 "2009-12-06T17:59:56Z")

</div>

Hi! My question is simple, is there any way to set an objects animation frame without playing it? Just lets say setting its frame from 0 to 10 and keeping it at 10? Thanks!

---

<div class="post-metadata">

**Author:** ![andeeeee](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@andeeeee](https://discussions.unity.com/u/andeeeee)\
**Post date:** [December 8, 2009, 2:58pm UTC](https://discussions.unity.com/t/animation-frame/403201/2 "2009-12-08T14:58:19Z")

</div>

You can’t set the frame number, but you can set a time using [AnimationState.time](http://unity3d.com/support/documentation/ScriptReference/AnimationState-time.html) or [AnimationState.normalizedTime](http://unity3d.com/support/documentation/ScriptReference/AnimationState-normalizedTime.html). You can freeze playback by setting the [speed](http://unity3d.com/support/documentation/ScriptReference/AnimationState-speed.html) value to zero.

---

<div class="post-metadata">

**Author:** ![RobbieDingo](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/robbiedingo/32/173338_2.png) [@RobbieDingo](https://discussions.unity.com/u/RobbieDingo)\
**Post date:** [December 8, 2009, 3:23pm UTC](https://discussions.unity.com/t/animation-frame/403201/3 "2009-12-08T15:23:39Z")

</div>

> [@""](#):
>
> Hi! My question is simple, is there any way to set an objects animation frame without playing it? Just lets say setting its frame from 0 to 10 and keeping it at 10? Thanks!

- If you want to play your animation through, from frame 0 to frame 10 THEN hold it at frame 10 you need to set the WrapMode to to ClampForever:

```auto
yourCharacter.animation["yourAnimationName"].wrapMode = WrapMode.ClampForever;

```

- If you want to be able to jump to, and stop on frame 10 immediately, then you could create a single frame animation in the import settings, again wrap as clamped.

Does that help?[/quote]

---

<div class="post-metadata">

**Author:** ![anon\_93692923](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@anon\_93692923](https://discussions.unity.com/u/anon_93692923)\
**Post date:** [December 8, 2009, 8:28pm UTC](https://discussions.unity.com/t/animation-frame/403201/4 "2009-12-08T20:28:52Z")

</div>

Thanks for the responses! It seems easiest to just make a single frame animation and then just play that animation for the effect that I jumped to a frame. Thanks again!
