# Creating 2d animations through script

**URL:** https://discussions.unity.com/t/creating-2d-animations-through-script/662115
**Category:** Animation
**Tags:** Scripting
**Created:** [April 19, 2017, 8:00pm UTC](https://discussions.unity.com/t/creating-2d-animations-through-script/662115 "2017-04-19T20:00:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Foxhound1980](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@Foxhound1980](https://discussions.unity.com/u/Foxhound1980)
#### Post date: [April 19, 2017, 8:00pm UTC](https://discussions.unity.com/t/creating-2d-animations-through-script/662115/1 "2017-04-19T20:00:25Z")

</div>

In another game engine I created an animation system which used multiple sprites moved around to show the animation, similar to what unity can do. I would like to import my files into unity. I’ve imported other file formats I have created so that part is easy. What I need to do is record the animations I need to load.

I’ve been able to create animators and animation clips through code but I do not seem to be able to record the actions, which at this point has just been to move to small sprites in opposite directions.

Any help is appreciated.

---

<div class="post-metadata">

### Author: ![Foxhound1980](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@Foxhound1980](https://discussions.unity.com/u/Foxhound1980)
#### Post date: [April 22, 2017, 4:58am UTC](https://discussions.unity.com/t/creating-2d-animations-through-script/662115/2 "2017-04-22T04:58:28Z")

</div>

I deleted the last post I made for this.

In this link

> **[How can I record mecanim animations with value changes on animator.speed?](https://discussions.unity.com/questions/855996/how-can-i-record-mecanim-animations-with-value-cha.html)**
>
> I need to record animations on mecanim and want also record the animator.speed changes to playback slow motion moments as well.

there is a project there where it can be ran. Here you can record any input you give the character, however anything that is done through script or in the inspector is not recorded.

Through script I simply have an object move. In the editor I just drag the object.

Is there some setting that would allow for all objects moved in anyway to be recorded?

---

<div class="post-metadata">

### Author: ![Foxhound1980](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@Foxhound1980](https://discussions.unity.com/u/Foxhound1980)
#### Post date: [April 24, 2017, 11:33pm UTC](https://discussions.unity.com/t/creating-2d-animations-through-script/662115/3 "2017-04-24T23:33:18Z")

</div>

Anything?
