Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by appearance · Jan 08, 2013 at 08:56 AM · animationclipanimationcurveanimationutility

Editor script to dump curves of animation clip to text file

I am looking for an editor script which can read all the curves from animation clip attached to the gameobject and log the keyframe / curve values to a text file.

After that, I can create AnimationClip runtime by reading the keyframe/curve data from the same text file. (This way I can modify any necessary property values if needed).

Is there a editor script available ? If not, kindly help me how I can write my own editor script to do this. Perhaps I have to use AnimationUtilty class for this.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · Jan 08, 2013 at 08:56 AM 1
Share

I did something of a curve reader for animation curves, I don't know how to access animation clip information sorry. Here is my answer on animation curves, the reader part may help when you find how to access the Animation Clip information : http://answers.unity3d.com/questions/320689/derive-an-equation-from-a-graph.html

Edit : After a quick search, it seems the Animation Clip curves are not that accessible. The best 2 answers point to AnimationUtility :

http://docs.unity3d.com/Documentation/ScriptReference/AnimationUtility.html

http://answers.unity3d.com/questions/33388/accessing-keyframes-from-an-animation.html

http://forum.unity3d.com/threads/29080-How-to-get-a-curve-inside-an-AnimationClip

Sorry, have no knowledge on animation clips, but am upvoting this question. Good Luck =]

avatar image appearance · Jan 08, 2013 at 01:01 PM 1
Share

You are right. Using AnimationUtility class clips can be opened and curves and keyframe data/values can be read. Using this technique we can dump the keyframe values to a text file (I like to dump it to a JSON file).

Is there any Editor Script available on internet which does such dumping ?

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by appearance · Jan 30, 2013 at 09:17 AM

I wrote such a script myself. It can be found here

In my next post, I will write a script which will use this JSON file to create animation clip at run-time and use it with game object(s).

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jipsen · Aug 24, 2020 at 11:30 AM 0
Share

Did you ever make the run-time script?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AnimationClip.SetCurve not setting a curve... 0 Answers

Unity 5.5: Jump to Frame in Unity Animation Window 0 Answers

Problem using mecanim and the Animation process 0 Answers

Animating an Animation Parameter with Mecanim 0 Answers

EDITOR: How to Change Animation Curve Colors 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges