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
 }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
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;
        }
Ejemplo n.º 4
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 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));
        }
    }