protected override void AddChanelToTrack(SpineAnimatorTrack spineAnimatorTrack)
                    {
                        if (spineAnimatorTrack != null)
                        {
                            //Work out next free channel to add
                            int channel = 0;

                            foreach (Spine3DAnimatorChannelTrack track in spineAnimatorTrack.GetChildTracks())
                            {
                                if (track != null)
                                {
                                    channel = Mathf.Max(channel, track._animationChannel + 1);
                                }
                            }

                            Spine3DAnimatorChannelTrack newTrack = TimelineEditorUtils.CreateChildTrack <Spine3DAnimatorChannelTrack>(spineAnimatorTrack, "Channel " + channel);
                            newTrack._animationChannel = channel;
                        }
                    }
                protected virtual void AddChanelToTrack(LegacyAnimatorTrack animatorTrack)
                {
                    if (animatorTrack != null)
                    {
                        //Work out next free channel to add
                        int channel = _channelProperty.intValue + 1;

                        foreach (LegacyAnimatorTrack track in animatorTrack.GetChildTracks())
                        {
                            if (track != null)
                            {
                                channel = Mathf.Max(channel, track._animationChannel + 1);
                            }
                        }

                        LegacyAnimatorTrack newTrack = TimelineEditorUtils.CreateChildTrack <LegacyAnimatorTrack>(animatorTrack, "Channel " + channel);
                        newTrack._animationChannel = channel;
                    }
                }
Example #3
0
                private void CreateSubTrack(object data)
                {
                    Type type = data as Type;

                    TimelineEditorUtils.CreateChildTrack(base.target as TrackAsset, type.Name, type);
                }