예제 #1
0
        internal unsafe static void Internal_GetPlayableAssetDuration(PlayableAsset asset, IntPtr ptrToDouble)
        {
            double  duration = asset.duration;
            double *ptr      = (double *)ptrToDouble.ToPointer();

            *ptr = duration;
        }
 static public int get_outputs(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Playables.PlayableAsset self = (UnityEngine.Playables.PlayableAsset)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.outputs);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int CreatePlayable(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Playables.PlayableAsset self = (UnityEngine.Playables.PlayableAsset)checkSelf(l);
         UnityEngine.Playables.PlayableGraph a1;
         checkValueType(l, 2, out a1);
         UnityEngine.GameObject a2;
         checkType(l, 3, out a2);
         var ret = self.CreatePlayable(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 public void Play(PlayableAsset asset)
 {
     if (asset == null)
     {
         throw new ArgumentNullException("asset");
     }
     this.Play(asset, this.extrapolationMode);
 }
 public void Play(PlayableAsset asset, DirectorWrapMode mode)
 {
     if (asset == null)
     {
         throw new ArgumentNullException("asset");
     }
     this.playableAsset     = asset;
     this.extrapolationMode = mode;
     this.Play();
 }
예제 #6
0
 static public int get_outputs(IntPtr l)
 {
     try {
         UnityEngine.Playables.PlayableAsset self = (UnityEngine.Playables.PlayableAsset)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.outputs);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Add(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
         UnityEngine.Playables.PlayableAsset arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
         obj.Add(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
예제 #8
0
        internal unsafe static void Internal_CreatePlayable(PlayableAsset asset, PlayableGraph graph, GameObject go, IntPtr ptr)
        {
            Playable playable;

            if (asset == null)
            {
                playable = Playable.Null;
            }
            else
            {
                playable = asset.CreatePlayable(graph, go);
            }
            Playable *ptr2 = (Playable *)ptr.ToPointer();

            *ptr2 = playable;
        }
 static int FindLast(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
         System.Predicate <UnityEngine.Playables.PlayableAsset> arg0 = (System.Predicate <UnityEngine.Playables.PlayableAsset>)ToLua.CheckDelegate <System.Predicate <UnityEngine.Playables.PlayableAsset> >(L, 2);
         UnityEngine.Playables.PlayableAsset o = obj.FindLast(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int _get_this(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Playables.PlayableAsset o = obj[arg0];
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int set_Item(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Playables.PlayableAsset arg1 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 3);
         obj[arg0] = arg1;
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int Remove(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
         UnityEngine.Playables.PlayableAsset arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
         bool o = obj.Remove(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_outputs(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Playables.PlayableAsset obj = (UnityEngine.Playables.PlayableAsset)o;
            System.Collections.Generic.IEnumerable <UnityEngine.Playables.PlayableBinding> ret = obj.outputs;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index outputs on a nil value"));
        }
    }
예제 #14
0
        internal static unsafe void Internal_CreatePlayable(PlayableAsset asset, PlayableGraph graph, GameObject go, IntPtr ptr)
        {
            Playable result;

            if (asset == null)
            {
                result = Playable.Null;
            }
            else
            {
                result = asset.CreatePlayable(graph, go);
            }

            Playable *handle = (Playable *)ptr.ToPointer();

            *handle = result;
        }
예제 #15
0
    static int set_playableAsset(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Playables.PlayableDirector obj  = (UnityEngine.Playables.PlayableDirector)o;
            UnityEngine.Playables.PlayableAsset    arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
            obj.playableAsset = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index playableAsset on a nil value"));
        }
    }
예제 #16
0
    static int get_playableAsset(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Playables.PlayableDirector obj = (UnityEngine.Playables.PlayableDirector)o;
            UnityEngine.Playables.PlayableAsset    ret = obj.playableAsset;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index playableAsset on a nil value"));
        }
    }
예제 #17
0
 static public int CreatePlayable(IntPtr l)
 {
     try {
         UnityEngine.Playables.PlayableAsset self = (UnityEngine.Playables.PlayableAsset)checkSelf(l);
         UnityEngine.Playables.PlayableGraph a1;
         checkValueType(l, 2, out a1);
         UnityEngine.GameObject a2;
         checkType(l, 3, out a2);
         var ret = self.CreatePlayable(a1, a2);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int get_duration(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Playables.PlayableAsset obj = (UnityEngine.Playables.PlayableAsset)o;
            double ret = obj.duration;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index duration on a nil value"));
        }
    }
    static int CreatePlayable(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            UnityEngine.Playables.PlayableAsset obj  = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 1);
            UnityEngine.Playables.PlayableGraph arg0 = StackTraits <UnityEngine.Playables.PlayableGraph> .Check(L, 2);

            UnityEngine.GameObject         arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject));
            UnityEngine.Playables.Playable o    = obj.CreatePlayable(arg0, arg1);
            ToLua.PushValue(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int BinarySearch(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
                UnityEngine.Playables.PlayableAsset arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                int o = obj.BinarySearch(arg0);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 3)
            {
                System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
                UnityEngine.Playables.PlayableAsset arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset> arg1 = (System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject <System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset> >(L, 3);
                int o = obj.BinarySearch(arg0, arg1);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else if (count == 5)
            {
                System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset> obj = (System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject(L, 1, typeof(System.Collections.Generic.List <UnityEngine.Playables.PlayableAsset>));
                int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
                int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                UnityEngine.Playables.PlayableAsset arg2 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 4);
                System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset> arg3 = (System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset>)ToLua.CheckObject <System.Collections.Generic.IComparer <UnityEngine.Playables.PlayableAsset> >(L, 5);
                int o = obj.BinarySearch(arg0, arg1, arg2, arg3);
                LuaDLL.lua_pushinteger(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: System.Collections.Generic.List<UnityEngine.Playables.PlayableAsset>.BinarySearch"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #21
0
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.Playables.PlayableDirector obj = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                obj.Play();
                return(0);
            }
            else if (count == 2)
            {
                UnityEngine.Playables.PlayableDirector obj  = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                UnityEngine.Playables.PlayableAsset    arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else if (count == 3)
            {
                UnityEngine.Playables.PlayableDirector obj  = (UnityEngine.Playables.PlayableDirector)ToLua.CheckObject <UnityEngine.Playables.PlayableDirector>(L, 1);
                UnityEngine.Playables.PlayableAsset    arg0 = (UnityEngine.Playables.PlayableAsset)ToLua.CheckObject <UnityEngine.Playables.PlayableAsset>(L, 2);
                UnityEngine.Playables.DirectorWrapMode arg1 = (UnityEngine.Playables.DirectorWrapMode)ToLua.CheckObject(L, 3, typeof(UnityEngine.Playables.DirectorWrapMode));
                obj.Play(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Playables.PlayableDirector.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }