You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
714 B
25 lines
714 B
using UnityEngine; |
|
using UnityEngine.Timeline; |
|
|
|
// Data sources for key overlays |
|
namespace UnityEditor.Timeline |
|
{ |
|
// Used for key overlays manipulators |
|
class AnimationTrackKeyDataSource : BasePropertyKeyDataSource |
|
{ |
|
readonly float m_TrackOffset; |
|
|
|
protected override AnimationClip animationClip { get; } |
|
|
|
public AnimationTrackKeyDataSource(AnimationTrack track) |
|
{ |
|
animationClip = track != null ? track.infiniteClip : null; |
|
m_TrackOffset = track != null ? (float)track.infiniteClipTimeOffset : 0.0f; |
|
} |
|
|
|
protected override float TransformKeyTime(float keyTime) |
|
{ |
|
return keyTime + m_TrackOffset; |
|
} |
|
} |
|
}
|
|
|