File size: 862 Bytes
18a519f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

namespace Timeline.Samples
{
    // Timeline track that supports changing the game time
    // The TimeDilation track demonstrates how to
    //  * Support blended and/or extrapolated clips.
    //  * Support changing a Unity static variable from timeline.
    [TrackColor(0.855f, 0.8623f, 0.87f)]
    [TrackClipType(typeof(TimeDilationPlayableAsset))]
    public class TimeDilationTrack : TrackAsset
    {
        // Creates a runtime instance of the track, represented by a PlayableBehaviour.
        // The runtime instance performs mixing on the timeline clips.
        public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
        {
            return ScriptPlayable<TimeDilationMixerBehaviour>.Create(graph, inputCount);
        }
    }
}