Set Animation Properties _ animation

Source: Internet
Author: User

Reproduced from: http://blog.csdn.net/qq617119142/article/details/49510173

Modify the recorded animation, or the animation properties in the model




The following is the Modify Looptime property


[csharp]  View Plain  copy [MenuItem ("Assets/loop=true")]   static void looptrue ()  {       object[] selectedasset = selection.getfiltered ( typeof (Object),  selectionmode.deepassets);       animationclip clip  = selectedAsset[0] as AnimationClip;       // Animationutility.getanimationclipsettings (clip). looptime = false;//cannot be directly assigned         animationclipsettings clipsetting = animationutility.getanimationclipsettings (clip) ;       clipSetting.loopTime = true;        animationutility.setanimationclipsettings (clip, clipsetting);      }       [MenuItem ("Assets/loop=fasle")]   Static void loopfalse ()  {        oBject[] selectedasset = selection.getfiltered (typeof (Object),  selectionmode.deepassets);        AnimationClip clip = selectedAsset[0] as  animationclip;       //animationutility.getanimationclipsettings (clip). LoopTime  = false;//cannot be directly assigned        animationclipsettings clipsetting =  animationutility.getanimationclipsettings (clip);       clipsetting.looptime  = false;       animationutility.setanimationclipsettings (clip,  clipsetting);     }  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.