SetAnimationClipSettingsNoDirty() private method

private SetAnimationClipSettingsNoDirty ( AnimationClip clip, AnimationClipSettings srcClipInfo ) : void
clip AnimationClip
srcClipInfo AnimationClipSettings
return void
Ejemplo n.º 1
0
        internal static AnimationClip AllocateAndSetupClip(bool useAnimator)
        {
            AnimationClip animationClip = new AnimationClip();

            if (useAnimator)
            {
                AnimationClipSettings animationClipSettings = AnimationUtility.GetAnimationClipSettings(animationClip);
                animationClipSettings.loopTime = true;
                AnimationUtility.SetAnimationClipSettingsNoDirty(animationClip, animationClipSettings);
            }
            return(animationClip);
        }
 public void AssignToPreviewClip(AnimationClip clip)
 {
     AnimationUtility.SetAnimationClipSettingsNoDirty(clip, 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
     });
 }
        public void AssignToPreviewClip(AnimationClip clip)
        {
            AnimationClipSettings info = new AnimationClipSettings();

            info.startTime          = firstFrame / clip.frameRate;
            info.stopTime           = lastFrame / clip.frameRate;
            info.orientationOffsetY = orientationOffsetY;
            info.level                     = level;
            info.cycleOffset               = cycleOffset;
            info.loopTime                  = loopTime;
            info.loopBlend                 = loopBlend;
            info.loopBlendOrientation      = loopBlendOrientation;
            info.loopBlendPositionY        = loopBlendPositionY;
            info.loopBlendPositionXZ       = loopBlendPositionXZ;
            info.keepOriginalOrientation   = keepOriginalOrientation;
            info.keepOriginalPositionY     = keepOriginalPositionY;
            info.keepOriginalPositionXZ    = keepOriginalPositionXZ;
            info.heightFromFeet            = heightFromFeet;
            info.mirror                    = mirror;
            info.hasAdditiveReferencePose  = hasAdditiveReferencePose;
            info.additiveReferencePoseTime = additiveReferencePoseFrame / clip.frameRate;

            AnimationUtility.SetAnimationClipSettingsNoDirty(clip, info);
        }