상속: AnimationPlayable
예제 #1
0
        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));
     }
 }
예제 #4
0
    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));
     }
 }
예제 #7
0
 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);
    }
예제 #17
0
 private static extern void SetRemoveStartOffset(ref AnimationClipPlayable that, bool value);
예제 #18
0
 private static extern bool GetRemoveStartOffset(ref AnimationClipPlayable that);
예제 #19
0
 private static extern void SetApplyFootIK(ref AnimationClipPlayable that, bool value);
예제 #20
0
 private static extern bool GetApplyFootIK(ref AnimationClipPlayable that);
예제 #21
0
 private static extern void SetSpeed(ref AnimationClipPlayable that, float value);
예제 #22
0
 private static extern float GetSpeed(ref AnimationClipPlayable that);
예제 #23
0
 private static extern AnimationClip GetAnimationClip(ref AnimationClipPlayable that);
예제 #24
0
 private static float GetSpeed(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetSpeed(ref handle));
 }
예제 #25
0
 private static void SetSpeed(ref PlayableHandle handle, float value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetSpeed(ref handle, value);
 }
예제 #26
0
 private static bool GetApplyFootIK(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetApplyFootIK(ref handle));
 }
예제 #27
0
 private static void SetApplyFootIK(ref PlayableHandle handle, bool value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetApplyFootIK(ref handle, value);
 }
예제 #28
0
 private static bool GetRemoveStartOffset(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetRemoveStartOffset(ref handle));
 }
예제 #29
0
 private static AnimationClip GetAnimationClip(ref PlayableHandle handle)
 {
     return(AnimationClipPlayable.INTERNAL_CALL_GetAnimationClip(ref handle));
 }
예제 #30
0
 internal static extern void InternalCreate(AnimationClip clip, ref AnimationClipPlayable that);
예제 #31
0
 private static void SetRemoveStartOffset(ref PlayableHandle handle, bool value)
 {
     AnimationClipPlayable.INTERNAL_CALL_SetRemoveStartOffset(ref handle, value);
 }