Esempio n. 1
0
        private void FindMixers()
        {
            this.m_Mixers.Clear();
            this.m_LayerMixer = AnimationLayerMixerPlayable.get_Null();
            Playable sourcePlayable  = PlayableOutputExtensions.GetSourcePlayable <AnimationPlayableOutput>(this.m_Output);
            int      sourceInputPort = PlayableOutputExtensions.GetSourceInputPort <AnimationPlayableOutput>(this.m_Output);

            if (PlayableExtensions.IsValid <Playable>(sourcePlayable) && sourceInputPort >= 0 && sourceInputPort < PlayableExtensions.GetInputCount <Playable>(sourcePlayable))
            {
                Playable input = PlayableExtensions.GetInput <Playable>(PlayableExtensions.GetInput <Playable>(sourcePlayable, sourceInputPort), 0);
                if (PlayableExtensions.IsValid <Playable>(input) && input.IsPlayableOfType <AnimationLayerMixerPlayable>())
                {
                    this.m_LayerMixer = (AnimationLayerMixerPlayable)input;
                    int inputCount = PlayableExtensions.GetInputCount <AnimationLayerMixerPlayable>(this.m_LayerMixer);
                    for (int i = 0; i < inputCount; i++)
                    {
                        this.FindMixers(this.m_LayerMixer, i, PlayableExtensions.GetInput <AnimationLayerMixerPlayable>(this.m_LayerMixer, i));
                    }
                }
            }
        }