#
var timelineAsset = director.playableAsset as TimelineAsset; foreach (PlayableBinding pb in timelineAsset.outputs) { //pb.streamName--轨道名称 //pb.sourceObject--轨道, 获取到轨道就可以获取ClipAsset //pb.outputTargetType--轨道绑定的类型, TrackBindingType Debug.Log("=====track"); Debug.Log($"type:{pb.GetType().Name}, trackName:{pb.streamName}"); if (null != pb.sourceObject) { TrackAsset trackAsset = pb.sourceObject as TrackAsset; foreach (TimelineClip clip in trackAsset.GetClips()) //轨道上的所有片段 { //... } } if (null != pb.outputTargetType) { Debug.Log($"[TrackBindingType]: {pb.outputTargetType.Name}"); } }
标签:片段,Log,outputTargetType,轨道,sourceObject,pb,Timeline,Debug From: https://www.cnblogs.com/sailJs/p/17010031.html