Beispiel #1
0
//----------------------------------------------------------------------------------------------------------------------

        protected override Playable CreateTrackMixerInternal(PlayableGraph graph, GameObject go, int inputCount)
        {
            InitTrackCurves();

            var mixer = ScriptPlayable <StreamingImageSequencePlayableMixer> .Create(graph, inputCount);

            PlayableDirector director = go.GetComponent <PlayableDirector>();

            m_trackMixer = mixer.GetBehaviour();

            if (director != null)
            {
                Object boundObject = director.GetGenericBinding(this);
                StreamingImageSequenceRenderer renderer = boundObject as StreamingImageSequenceRenderer;

                if (null == renderer)
                {
                    //no object bound to the track
                    m_trackMixer.Init(null, director, GetClips());
                }
                else
                {
                    m_trackMixer.Init(renderer.gameObject, director, GetClips());
                    renderer.Init();
                    m_trackMixer.SetRenderer(renderer);
                }
            }

            return(mixer);
        }
Beispiel #2
0
 internal void SetRenderer(StreamingImageSequenceRenderer renderer) {
     m_sisRenderer = renderer;
     
 }