Inheritance: AnimationPlayable
        public static AnimationClipPlayable Create(AnimationClip clip)
        {
            AnimationClipPlayable that = new AnimationClipPlayable();

            InternalCreate(clip, ref that);
            return(that);
        }
        public static AnimationClipPlayable Create(AnimationClip clip)
        {
            AnimationClipPlayable result = default(AnimationClipPlayable);

            AnimationClipPlayable.InternalCreate(clip, ref result);
            return(result);
        }
 static public int RemoveInput(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(UnityEngine.Experimental.Director.AnimationPlayable)))
         {
             UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
             UnityEngine.Experimental.Director.AnimationPlayable     a1;
             checkType(l, 2, out a1);
             var ret = self.RemoveInput(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(int)))
         {
             UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             var ret = self.RemoveInput(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    void Start()
    {
        // Wrap the clip in a playable
        AnimationClipPlayable clipPlayable = new AnimationClipPlayable( clip );

        // Bind the playable to the player
        GetComponent<Animator>().Play( clipPlayable );
    }
    void Start()
    {
        // Wrap the clip and the controller in playables
        AnimationClipPlayable clip_playable = new AnimationClipPlayable( clip );
        AnimatorControllerPlayable controller_playable = new AnimatorControllerPlayable( anim_controller );
        AnimationMixerPlayable mixer = new AnimationMixerPlayable();
        mixer.SetInputs( new AnimationPlayable[] {clip_playable, controller_playable} );

        // Bind the playable graph to the player
        GetComponent<Animator>().Play( mixer );
    }
 static public int get_speed(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.speed);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 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);
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable o;
         o = new UnityEngine.Experimental.Director.AnimationClipPlayable();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 /// <summary>
 ///   <para>Automatically creates an AnimationClipPlayable for each supplied AnimationClip, then sets them as inputs to the mixer.</para>
 /// </summary>
 /// <param name="clips">AnimationClips to be used as inputs.</param>
 /// <returns>
 ///   <para>Returns false if the creation of the AnimationClipPlayables failed, or if the connection failed.</para>
 /// </returns>
 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[] array = new AnimationPlayable[clips.Length];
     for (int i = 0; i < clips.Length; i++)
     {
         array[i] = new AnimationClipPlayable(clips[i]);
     }
     return(base.SetInputs(array));
 }
 static public int RemoveAllInputs(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
         var ret = self.RemoveAllInputs();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.Experimental.Director.AnimationClipPlayable o;
			UnityEngine.AnimationClip a1;
			checkType(l,2,out a1);
			o=new UnityEngine.Experimental.Director.AnimationClipPlayable(a1);
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int set_speed(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.speed = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int AddInput(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
         UnityEngine.Experimental.Director.AnimationPlayable     a1;
         checkType(l, 2, out a1);
         var ret = self.AddInput(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int SetInputs(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationClipPlayable self = (UnityEngine.Experimental.Director.AnimationClipPlayable)checkSelf(l);
         System.Collections.Generic.IEnumerable <UnityEngine.Experimental.Director.AnimationPlayable> a1;
         checkType(l, 2, out a1);
         var ret = self.SetInputs(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 internal static bool SetInputs(AnimationMixerPlayable playable, AnimationClip[] clips)
 {
     if (clips == null)
     {
         throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
     }
     Playables.BeginIgnoreAllocationTracker();
     Playable[] sources = new Playable[clips.Length];
     for (int i = 0; i < clips.Length; i++)
     {
         sources[i] = (Playable)AnimationClipPlayable.Create(clips[i]);
         Playable target = sources[i];
         Playables.SetPlayableDeleteOnDisconnect(ref target, true);
     }
     Playables.EndIgnoreAllocationTracker();
     return(SetInputsValidated((AnimationPlayable)playable, sources, typeof(AnimationMixerPlayable)));
 }
    private void AddNodeRandomly()
    {
        // Pick one mixer randomly, and create either another mixer or a leaf
        int parentIndex = Random.Range(0, m_Mixers.Count);
        AnimationMixerPlayable parent = m_Mixers[parentIndex];
        AnimationPlayable newNode;

        if (Random.value > k_ProportionOfLeaves)
        {
            newNode = new AnimationMixerPlayable();
            m_Mixers.Add(newNode as AnimationMixerPlayable);
        }
        else
        {
            newNode = new AnimationClipPlayable(null);
        }

        parent.AddInput(newNode);
        parent.SetInputWeight(parent.GetInputs().Length - 1, Random.value);

        // Call this to visualize the graph in the graph visualizer. Will only be effective if window is open.
        GraphVisualizerClient.Show(m_Root, gameObject.name);
    }
Esempio n. 17
0
 private static extern void SetRemoveStartOffset(ref AnimationClipPlayable that, bool value);
Esempio n. 18
0
 private static extern bool GetRemoveStartOffset(ref AnimationClipPlayable that);
Esempio n. 19
0
 private static extern void SetApplyFootIK(ref AnimationClipPlayable that, bool value);
Esempio n. 20
0
 private static extern bool GetApplyFootIK(ref AnimationClipPlayable that);
Esempio n. 21
0
 private static extern void SetSpeed(ref AnimationClipPlayable that, float value);
Esempio n. 22
0
 private static extern float GetSpeed(ref AnimationClipPlayable that);
Esempio n. 23
0
 private static extern AnimationClip GetAnimationClip(ref AnimationClipPlayable that);
Esempio n. 24
0
 private static float GetSpeed(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetSpeed(ref handle));
 }
Esempio n. 25
0
 private static void SetSpeed(ref PlayableHandle handle, float value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetSpeed(ref handle, value);
 }
Esempio n. 26
0
 private static bool GetApplyFootIK(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetApplyFootIK(ref handle));
 }
Esempio n. 27
0
 private static void SetApplyFootIK(ref PlayableHandle handle, bool value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetApplyFootIK(ref handle, value);
 }
Esempio n. 28
0
 private static bool GetRemoveStartOffset(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetRemoveStartOffset(ref handle));
 }
Esempio n. 29
0
 private static AnimationClip GetAnimationClip(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetAnimationClip(ref handle));
 }
Esempio n. 30
0
 internal static extern void InternalCreate(AnimationClip clip, ref AnimationClipPlayable that);
Esempio n. 31
0
 private static void SetRemoveStartOffset(ref PlayableHandle handle, bool value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetRemoveStartOffset(ref handle, value);
 }