Ejemplo n.º 1
0
    public void ParseTrack()
    {
        foreach (PlayableBinding pb in director.playableAsset.outputs)
        {
            if (pb.sourceObject is AnimationTrack)
            {
                AnimationTrack track    = pb.sourceObject as AnimationTrack;
                int            cnt      = track.GetMarkerCount();
                var            tfTracks = new List <AnchorSignalEmitter>();
                var            marks    = track.GetMarkers().GetEnumerator();
                while (marks.MoveNext())
                {
                    IMarker mark = marks.Current;
                    if (mark is AnchorSignalEmitter)
                    {
                        tfTracks.Add(mark as AnchorSignalEmitter);
                    }
                }
                marks.Dispose();

                for (int i = 0; i < tfTracks.Count; i++)
                {
                    AnchorSignalEmitter sign = tfTracks[i];
                    Debug.Log(sign.time + " " + sign.position);
                }
            }
        }
    }