private static FAnimationTrackCache GetAnimationPreview(FAnimationTrack animTrack, bool createIfDoesntExist) { Dictionary <int, FAnimationTrackCache> sequencePreviews = null; if (!_animPreviews.TryGetValue(animTrack.Sequence.GetInstanceID(), out sequencePreviews)) { if (!createIfDoesntExist) { return(null); } sequencePreviews = new Dictionary <int, FAnimationTrackCache>(); _animPreviews.Add(animTrack.Sequence.GetInstanceID(), sequencePreviews); } FAnimationTrackCache preview = null; if (!sequencePreviews.TryGetValue(animTrack.Owner.GetInstanceID(), out preview)) { if (!createIfDoesntExist) { return(null); } preview = new FAnimationTrackCache(animTrack); sequencePreviews.Add(animTrack.Owner.GetInstanceID(), preview); } return(preview); }
public static FAnimationTrackCache GetAnimationPreview(FSequence sequence, Transform owner) { Dictionary <int, FAnimationTrackCache> sequencePreviews = null; FAnimationTrackCache animationTrackCache = null; if (_animPreviews.TryGetValue(sequence.GetInstanceID(), out sequencePreviews)) { sequencePreviews.TryGetValue(owner.GetInstanceID(), out animationTrackCache); } return(animationTrackCache); }
public override void ClearCache() { FAnimationTrackCache preview = (FAnimationTrackCache)Cache;//GetAnimationPreview( this, false ); if (preview != null) { if (preview.NumberTracksCached <= 1) { DeleteAnimationPreview(this); } else { preview.Build(true); } } }
public override void CreateCache() { FAnimationTrackCache preview = GetAnimationPreview(this); preview.Build(true); }