Legacy Documentation: Version 2018.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Animation.AddClip

Switch to Manual
public void AddClip(AnimationClip clip, string newName);

Description

Adds a clip to the animation with name newName.


public void AddClip(AnimationClip clip, string newName, int firstFrame, int lastFrame, bool addLoopFrame = false);

Parameters

addLoopFrameShould an extra frame be inserted at the end that matches the first frame? Turn this on if you are making a looping animation.

Description

Adds clip to the only play between firstFrame and lastFrame. The new clip will also be added to the animation with name newName.

If a clip with that name already exists it will be replaced with the new clip.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答