public void AssignToPreviewClip(AnimationClip clip)
{
AnimationClipSettings srcClipInfo = new AnimationClipSettings {
startTime = this.firstFrame / clip.frameRate,
stopTime = this.lastFrame / clip.frameRate,
orientationOffsetY = this.orientationOffsetY,
level = this.level,
cycleOffset = this.cycleOffset,
loopTime = this.loopTime,
loopBlend = this.loopBlend,
loopBlendOrientation = this.loopBlendOrientation,
loopBlendPositionY = this.loopBlendPositionY,
loopBlendPositionXZ = this.loopBlendPositionXZ,
keepOriginalOrientation = this.keepOriginalOrientation,
keepOriginalPositionY = this.keepOriginalPositionY,
keepOriginalPositionXZ = this.keepOriginalPositionXZ,
heightFromFeet = this.heightFromFeet,
mirror = this.mirror,
hasAdditiveReferencePose = this.hasAdditiveReferencePose,
additiveReferencePoseTime = this.additiveReferencePoseFrame / clip.frameRate
};
AnimationUtility.SetAnimationClipSettingsNoDirty(clip, srcClipInfo);
}