UnityEngine.Experimental.Director.AnimationMixerPlayable.SetInputs C# (CSharp) Method

SetInputs() public method

public SetInputs ( AnimationClip clips ) : bool
clips UnityEngine.AnimationClip
return bool
        public bool SetInputs(AnimationClip[] clips)
        {
            if (clips == null)
            {
                throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
            }
            AnimationPlayable[] sources = new AnimationPlayable[clips.Length];
            for (int i = 0; i < clips.Length; i++)
            {
                sources[i] = new AnimationClipPlayable(clips[i]);
            }
            return base.SetInputs(sources);
        }
    }

Usage Example

    void Start()
    {
        mixer = new AnimationMixerPlayable();
        mixer.SetInputs( new []{ clip_0, clip_1 }  );

        GetComponent<Animator>().Play( mixer );
    }
All Usage Examples Of UnityEngine.Experimental.Director.AnimationMixerPlayable::SetInputs