Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animator - The Ultimate Timeline Cutscene Editor for Unity

Discussion in 'Assets and Asset Store' started by absameen, May 14, 2012.

?

What would you like to see next with Animator?

  1. More Camera Transitions

    35 vote(s)
    24.6%
  2. More Videos / Tutorials

    41 vote(s)
    28.9%
  3. HOTween Support

    34 vote(s)
    23.9%
  4. Unity 4.0 Support

    84 vote(s)
    59.2%
  5. Other / Please Specify

    13 vote(s)
    9.2%
Multiple votes are allowed.
  1. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Thanks!

    The best way I can think of for various JSON API is to have an interface you implement and register it globally to MateAnimator before doing any import/export. Hopefully it wouldn't be too complex...just a way to serialize/de-serialize a given object. In fact, it wouldn't be specific to JSON, so long as the correct serialization is implemented.

    In terms of Mobile compatibility, I haven't personally tested it yet. I have, however, tested this on Ouya (which is pretty much on-par with android tablets) and it seems to work with good performance. This is however with no stripping of the api, which may screw up reflection. I'll have to take a look at how much I use the reflection api, that's usually the issue.
     
    Last edited: Feb 7, 2014
  2. pat333

    pat333

    Joined:
    Jan 29, 2014
    Posts:
    1
    Hi Sinfritz,

    First of, thanks for sharing this (and to absameen for releasing it!). It's very helpful. I've only able to get the editor working in my version of Unity using your updated version.

    The 'duplicate take' functionality doesn't seem to work for me. Is this dependent on the JSON importing/exporting or is it a separate issue? For me, the timelines are copied but not the actual keyframe data. I'm able to workaround by manually copy-pasting each lane. Wondering if there could be a better workaround than that. If I get some time, I may have a poke around myself, because really I prefer this tool to the others I've tried.

    btw, this works for me in iOS, at least for what I've been using it for so far.

     
    Last edited: Mar 1, 2014
  3. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Thanks, I'm glad you find it useful! Glad to know it working on iOS!

    Yeah, the duplicate is currently only copying each track, but not their key frames. I haven't gotten around it, so hopefully that will be fairly trivial to do. I'm thinking there should be 2 options for this:

    1) complete copy of the take with all the tracks and keyframes.
    2) copy take and all the tracks, then create a keyframe for each copied track based on the current frame selected from the take. (or just the last keys for each track, that might be simpler to do)

     
  4. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Just a heads-up for anyone using this, the latest version has now been updated, grab it here from the repository:

    https://github.com/ddionisio/MateAnimator

    This basically fixes up all the undo/redo, and additional fixes here and there. Please let me know if there are any issues you guys encounter, especially the undo/redo. It's a whole lot more stable now.

    As for the next thing to work on, I'm looking at the issue with overloaded functions. After that, possibly another track type where you set the value, rather than tween it. This will be useful for sprite animations, as well as turning things on/off (as you can see with the GOActive track). Oh yeah, and the duplicate track, I need to make that a 1:1 copy...but I'd also like to add another one where you duplicate and copy only the current timeframe (useful for making takes that chain).

    Import/Export will be a little tricky, I'm trying to figure out what to do with it. I'm thinking each take can be import/export. So essentially it is an animation file. This is useful for sharing the data across separate animators, as well as re-used for different projects. The tricky bits will be the object references.
     
  5. yvon

    yvon

    Joined:
    Feb 20, 2013
    Posts:
    8
    Thank you for taking care of this awesome tool. I'll try your version as soon as my project is over to avoid any conflicts or bugs within my current project.
     
  6. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    New version now available:

    https://github.com/ddionisio/MateAnimator

    Changes:

    • Duplicating a take now also duplicates the keys.
    • Added "No Tween" to tweenable tracks: translate, rotate, orientation, property. This allows for setting values with no interpolation if needed. Useful for things like warping objects in different location, or per-frame animation. Also for setting states on behaviours using the integer property.
    • Added boolean and string to property track. This can handy when you want to set states in behaviours using the string or bool at specific frames, etc.

    I'll see if I can take a stab at the issue with overloaded functions, and also have a better interface for selecting functions. It's a bit of a mess to use that right now.

    Other possible track types to add: 2D renderer properties (for sprite animation), particles (mostly to play and stop it at the proper time frame, and for preview), material properties.
     
  7. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    You should be able to upgrade without any issues, there's no change in the data structure. Although if you do want to upgrade, make sure to back-up your project, just in case!

    PS: Your game project Chilie looks awesome, very charming! :p
     
  8. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    New version now available:

    https://github.com/ddionisio/MateAnimator

    Just a quick update: The issue with the window positioning is finally fixed, that's been bugging me for a long time. Also, selecting overloaded functions for events are now working correctly.
     
  9. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    awesome will have a look.
    cheers
     
  10. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    I wanna make my animation stops, or play, all by scripting I watched the video, but There is something wrong
    I do everything the video says to me, but I get an error:

    BCE0005: Unknown identifier: 'AnimatorTimeline'.

    Does Anybody could help me on this?
     
  11. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    this

    It's no longer global, so you will have to reference the AnimatorData component and call Play("Take") from there. Maybe I can add a flag to set one as global. For now, in your script, you can add an AnimatorData field. Then set it to whichever timeline you want to control (Play, Stop, etc.)
     
  12. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    First of all, Thanks a lot for trying to help me.

    Second, I think I did all you said, but now it saying that "Play" is unknown identifier, here is what I did:
    $DuvidaAnimator.jpg

    I'd be very happy if you could help me on this, It would make my job much easier.
     
  13. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    i use c sharp, so i think it should be something like that

    animar class


    animatorData myanimation;

    void start(){
    this.myanimation.Play("Take1");

    }

    hopefully that works for you
     
  14. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    Well, Thanks for you help, I was able to do it,
    Actually, I tried maaaany things, but really, I don't know why it worked...
    I Guess it's because folder's positions that I was using, I heard something about Standard Assests are compiled first, or something like that, not sure

    Anyway, I working on what I want, still confusing but I'm working on it

    Thanks a Lot for your help
    God bless you
    Have a nice scrippiting!!!

    André Sandei.
     
    Last edited: Apr 9, 2014
  15. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    @andresandei Did you fix the issue by moving the Animator scripts in the Plugins folder? I remember this issue, but it was the other way around, C# trying to call functions from javascript. Things in the Plugins folder gets compiled first, that includes stuff like if you have device specific external code (e.g. android, ios).

    I'll post some updates as soon as I get some of these newer features in. A new video could help explain some of the changes, so that's coming up too.
     
  16. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    @Sinfritz Well, almost that. I moved the folder "Animator" that comes when you download the componnent, and put it inside "Standard Assets", I created The folder Standard Assets, because when I started my project, I started it empty and created the folders, I created the folder Plugin, but the script that is on it are no longer used, that was just a failed try. Now on my java Script I wrote:

    AnimatorTimeline.Play("Take1",true);

    And it's working, I tried to use on a event track call a function to stop the animation, but it's not working very well if I write:

    AnimatorTimeline.Stop("Take1",true);

    It doesn't work, but if I say:

    AnimatorTimeline.Stop();

    It works but not the way I'd like, seems that it stops just a track, not all tracks in the take...

    But there is something that is making me a litlle bit sad, because maybe i can not use it, here it is:
    In the computer I work unity is 4.3.1, but to download from the asset store, it is saying 4.3.4(something like that) to download, so I got in a computer with unity 4.3.4 and download it, and copy all the folders from that computer to this one, I could do the animation and stuff, but sometimes when I close my project and open it again it said that had a layout problem that could be happening due a script with errors, I click on load default layout, but my project becomes all messy with some errors that didn't happened before...

    Now I don't know if the problem is becaus of the version or I'm doing something wrong, or something with the componnent.

    Do you know something about this things???

    Well, please let me know when you do the things you just said, from here, or actually if there is some kind of newsletter, my e-mail is:
    andresandei@yahoo.com.br

    Already thanks.
     
  17. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Try naming the folder "Plugins" instead of "Plugin", I'm pretty sure that should work. I guess Unity also marks "Standard Assets" as part of Plugins too if that's the case. I suppose either way works, it's just much cleaner if all 3rd party scripts are stored in Plugins.

    Are you using the scripts from the Asset Store? That's the original version, if so, try getting my version on github:
    https://github.com/ddionisio/MateAnimator

    If you don't have any github tools to clone the project, you can click on the "Download ZIP" and extract the files inside to your project (I suppose in your case, Standard Assets).

    I don't recall there being a function Stop that has a string and bool param...Stop is suppose to stop all the tracks, so there may be a bug.

    Is the layout issue persistent? It may have something to do with changing the scripts to a different version, that's usually the case when upgrading. But it should only happen once. Try closing all the windows in Unity, close Unity, then run Unity again.
     
  18. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    Yeah, I was using from Assets Store, now I download yours, seems it is more "solid", "stable"

    Anyway, now I think I'm not having problems anymore, till now.

    Thanks for helping me, I'm happy I can use it, I was so used to adobe flash, I feel at home now, hahaha
    If I can help you with something, let me know.

    Don't forget to keep me on the news in this project!!!!
    Congratulations for your job.

    God bless you!!!
     
  19. DragonSix

    DragonSix

    Joined:
    Jul 2, 2013
    Posts:
    37
    First off, this is by far the best cutscene editor for Unity. Thanks a lot for that great tool, I would've gladly paid for it.

    Is there any plan to support mecanim animations? It works beautifully with legacy, but I might need to switch to mecanim characters, which don't work with the current timeline editor (yes you can use event calls, but that's not very useful when you can't visualize the animations).
     
  20. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Thanks! It's the reason I decided to add modifications to it, there's no other animator out there that I know which is similar to Flash's timeline in Unity.

    I don't know if mecanim did work with the original version...I'll have to take a look. I'm not familiar with mecanim right now, but I'll definitely support it once I get to that point.

    Do you guys have any specific idea how the animator would work with mecanim? I'm guessing things like being able to set and play an animation state and be able to see it while scrubbing would be useful.
     
  21. DragonSix

    DragonSix

    Joined:
    Jul 2, 2013
    Posts:
    37
    I know that since 4.3 Mecanim can be used in the same fashion as legacy, by directly calling play/crossfade from/to any state in code. Using that would be the way to go. I don't know about being able to see it in editor tho.
     
    Last edited: Apr 22, 2014
  22. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    New update for the plugin.

    • Drag/drop sprite assets into the Animator Window to add a sprite animation track. This is essentially a shortcut to a property track that links to the 'sprite' variable. You can also drag/drop sprite assets to an existing sprite animation track.
    • Trigger track - Use this to evoke a trigger within the animation. This will call any functions you add with AnimatorData.takeTriggerCallback.
    • Added shared animation file. This helps with sharing animation data and be able to propagate any changes to it for all objects using this animation. This works similarly to Unity's animation file, so make sure the object hierarchy matches. The animator data inspector will show you the list of any missing objects if that happens.
    • Camera switcher has been added back. Pretty much works the way it does with the old version.
    • Keyboard shortcut within the Animator Window. You can copy/paste keys using Ctrl + C or P, duplicate keys using Ctrl + D, arrow keys to navigate and select keys.
    Eventually I'll create an updated manual for the new features, as well as a couple videos to show them off.

    You can get the latest here
     
    Last edited: May 11, 2014
  23. Xand3r

    Xand3r

    Joined:
    Mar 28, 2013
    Posts:
    5
    Hello there!

    Im using the original version from the asset store, and im trying to do the following:

    When you add an event to the timeline, you can select which function to call, thats all fine.
    But I want to give an enum as the parameter.
    I tried to implement this, and the furthest I could come, is that it is working until you press play.
    In the classes AMTimeline.cs and AMEventParameter.cs I've added my new Enum value everywhere, including casting it to the correct type.

    Could anyone give some insight into the workflow how the parameters finally get stored and accessed at runtime?

    Thanks in advance!
     
  24. andresandei

    andresandei

    Joined:
    Mar 12, 2014
    Posts:
    10
    Well, Actually I don't know how to solve your problem, but I was having some problems with the original version from asset store, I recommend you download the updated one, That solve some of my problems:

    https://github.com/ddionisio/MateAnimator

    Sorry if this isn't usefull for you
    Hope you can fix it ASAP
     
  25. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Parameters basically hold a value type (valueType) and is reconstructed to correspond to the Method's function signature. The value themselves are basically either 'int', 'string', 'Vector4', or 'Object'. In the original, you can see this in the action script, I think under 'execute'. For the updated one, it's in the key script, 'buildTweener'.

    In the case of enums, you will have to store its type in the param as well. So during reconstruction, you cast that particular parameter to the enum type based on the value. You can either use the 'int' value or the 'string' value to store the data. It should be possible to get the enum value based on the string, though 'int' is much easier and use less space.

    Adding enum support for events can be useful I suppose, I generally just use int and cast it in the function being called.
     
  26. Xand3r

    Xand3r

    Joined:
    Mar 28, 2013
    Posts:
    5
    Many thanks! I'll try to implement it today :D
     
  27. Xand3r

    Xand3r

    Joined:
    Mar 28, 2013
    Posts:
    5
    It worked!
    I had to add the enum to the code via an object array.
    The first value will be the Type casted to string. The second value will be the index of the enum value.
    I had to add this ''valueType'' to every script where the other valuetypes were used.
    In the end, to use it in the invokeMethod(AMTween.cs), I had to cast this object array to an enum.
    If you want to do this, you need to store the type name in a string as follows:

    (What you get in the functions) Type t > val_enum ( a string) will be casted as t.AssemblyQualifiedName
    Then, use the converter posted here in the comments to cast this string value to the correct Enum type.

    It's a bit short this story and may be unclear, if anyone in the future need any help just PM me and (I hope) I still can help you!
    Would be a great addition to both versions though, it makes the workflow way better!

    Cheers!
     
  28. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Nice, that's definitely the way to go! I'll definitely add it to the other version once I get around to it.
     
  29. mruce

    mruce

    Joined:
    Jul 23, 2012
    Posts:
    28
    Hi, I'm gettin familiar with Animator, seems like a tool that I've been looking for. I just have a problem with moving Animator window - it's very jittery for some reason. Also context manus display in wrong spots. Any idea why is that?
    Working on W7.
     
  30. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Are you using the one from the asset store? I have a modified version that fixed that issue.

    Here is the link to the github: https://github.com/ddionisio/MateAnimator From there you can clone the project or download the zip, then place/extract the files to a folder in your assets.

     
  31. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hi sinfritz
    i just notice that you implement the switch cam in the latest version of mateanimator, wich is awesome, i immediatly test it, unfortunately it crash unity when i start using it, is this still on progress and a known bug?

    cheers
     
  32. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Yeah, it's something I haven't exactly figured out the steps to reproduce. It crashes Unity, so that makes it worse...

    There is a new version of Unity today, which is 4.5, so try it out again. I haven't been able to reproduce it thus far.

    Make sure to get the latest update from the repo, as that fixes some error messages when you upgrade your Unity.

     
  33. toto2003

    toto2003

    Joined:
    Sep 22, 2010
    Posts:
    528
    hi sinfritz
    it crash when you target ios or android plateform, doesn t crash on pc build tho... i use unity 4.3.5 for now , will try with 4.5 and let you know

    edit; i just test with 4.5 and it seem to work fine, i m really happy you put this camera switch back, it s just awesome
    thank you sooooo much.
     
    Last edited: May 28, 2014
  34. gamefx32

    gamefx32

    Joined:
    May 30, 2014
    Posts:
    3
    Hi Sinfritz - you've made some amazing improvements to the original timeline editor! I'm currently using your latest build on unity 4.3 - mostly to play back imported .fbx files with animation.

    The problem im having is getting the fbx animation to play using the AnimatorTimeline.PlayFromTime (or PlayFromFrame) method. It works great on other objects with tweens on them, but the fbx's *dont* update/animate unless PlayFromTime is set to 0 ie: PlayFromTime("mytake",0.0f,false).

    I did some further investigation and found that AnimatorTimeline.PreviewTime() at least will play the correct 'frame' of animation on the fbx - but this method isnt meant to play animation unfortunately.

    Any ideas why PlayFromTime() doesnt update fbx animation? the pause() and resume() also dont seem to work on fbx animation.

    Again, note that the fbx's animation plays back perfectly using AnimatorTimeline.Play("mytake",false) but not using AnimatorTimeline.PlayFromTime("mytake",2.0f,false).
     
  35. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Ah, that's because I only play the Animation via event (InsertCallback in Sequencer) during runtime when you play the take...so it's getting skipped if you call PlayFromTime with a time greater than the start frame of when the event is triggered.

    I'll definitely take a look at it, thanks for letting me know!

     
  36. gamefx32

    gamefx32

    Joined:
    May 30, 2014
    Posts:
    3
    Cool - I figured it might be something like that, I hope its an easy fix. Thanks for taking a look at it when you have time :)
     
  37. Ive

    Ive

    Joined:
    Apr 24, 2013
    Posts:
    9
    Hello, I would like to know how to save Takes each animation. I want to be able to store each TAKE use them later. Thanks.
     
  38. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    938
    Last edited: Jun 12, 2014
    Ive likes this.
  39. Ive

    Ive

    Joined:
    Apr 24, 2013
    Posts:
    9
    --------------

    You can send us the link of the file?
     
  40. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    938
    What file? HOTween is publicly available on their website.
     
  41. gamefx32

    gamefx32

    Joined:
    May 30, 2014
    Posts:
    3
    Hi Sinfritz - I just downloaded the latest M8 and Wow! fbx animation updates perfectly now! I'm able to scrub anywhere on the timeline and it animates to the right frame exactly. Nice work!

    The problem Im having now is related to the fbx problem - when i scrub on the timeline i notice the camera switcher (using crossfades etc) doesnt update unless i scrub 'past' a keyframe. I guess its the same bug as the fbx animation? Hope this one is easy to fix too - would be great to be able to scrub crossfades/cam switches properly.

    Thanks again for all your help
     
  42. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Sinfritz : I created a fork of your repo and reworked the GUI. Took out the blue skin and made a light and dark skin that closer matches Unity. It automatically changes depending on Unities skin colour. Also added wave form display for audio tracks. Please take a look and maybe merge it into yours for future :)

    https://github.com/quickfingerz/MateAnimator
     
  43. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Ha, Yeah I notice a couple days back! I'll definitely merge those changes. Thanks!

    @gamefx32 The camera switcher, I haven't fully looked into as I haven't really used it yet. I'll have to look at that as well.

    As for the HOTween issue, make sure to download the latest HOTween, since it added a new 'pure virtual' functions in its Plugin class...You can get the latest HOTween reliably here:

    http://hotween.demigiant.com/
     
  44. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    There's no feature for that yet...something like an import/export? I had something like that in mind, so that's in the TODO list for sure.
     
  45. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Hey Sinfritz, I noticed an issue with my cutscenes so far, audio seems to always play right at the start, even if the first keyframe is well into the cutscene. I'm trying to find the cause but getting a bit lost in the code
     
  46. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    also they never play if set to loop, no matter where they are :)
     
  47. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Hm...I may have fixed it. When you say "loop", is that when you call the Play function with loop=true, or setting the count = -1 in the animation's setting? Edit: oh wait, I think you meant the audio?

    I'll have to take a look at the audio issue as well.
     
    Last edited: Jun 30, 2014
  48. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Also, there's a new version in the repository, it fixes the issue with the camera switcher not playing properly when played after its first frame. Along with a couple more bug fixes.

    I've also merged @Quickfingers changes with the GUI, looks pretty sweet. But there's an issue someone pointed out with certain video cards that do not support NPOT will cause them to draw incorrectly...
     
  49. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Yes I did mean audio thanks :) It's strange it always plays right at the start no matter where you put the audio, however if the audio is set to loop and not on frame 1 it never plays.. curious!
     
  50. Sinfritz

    Sinfritz

    Joined:
    Nov 18, 2012
    Posts:
    72
    Should be fixed now! The audio was playing right away because "play on awake" is default to true when you instantiate it on the scene. I made it so that it is set to false when you create an audio track for it.