internal static bool IsRecordingToClip(this TrackAsset track, TimelineClip clip) { bool result; if (track == null || clip == null) { result = false; } else { AnimationClip activeRecordingAnimationClip = track.GetActiveRecordingAnimationClip(); if (activeRecordingAnimationClip == null) { result = false; } else if (activeRecordingAnimationClip == clip.curves) { result = true; } else { AnimationPlayableAsset animationPlayableAsset = clip.asset as AnimationPlayableAsset; result = (animationPlayableAsset != null && activeRecordingAnimationClip == animationPlayableAsset.clip); } } return(result); }
internal static void OnRecordingTimeChanged(this TrackAsset track, PlayableDirector director) { if (track == null) return; var animClip = track.FindRecordingAnimationClipAtTime(director.time); AnimationClip prevClip = track.GetActiveRecordingAnimationClip(); if (prevClip != animClip) { s_ActiveClips[track] = animClip; } }
internal static void OnRecordingTimeChanged(this TrackAsset track, PlayableDirector director) { if (!(track == null)) { AnimationClip animationClip = track.FindRecordingAnimationClipAtTime(director.get_time()); AnimationClip activeRecordingAnimationClip = track.GetActiveRecordingAnimationClip(); if (activeRecordingAnimationClip != animationClip) { TrackAssetRecordingExtensions.s_ActiveClips[track] = animationClip; } } }
internal static bool IsRecordingToClip(this TrackAsset track, TimelineClip clip) { if (track == null || clip == null) return false; var animClip = track.GetActiveRecordingAnimationClip(); if (animClip == null) return false; if (animClip == clip.curves) return true; var animAsset = clip.asset as AnimationPlayableAsset; return animAsset != null && animClip == animAsset.clip; }