static public int AddSource(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.Animations.LookAtConstraint self = (UnityEngine.Animations.LookAtConstraint)checkSelf(l);
         UnityEngine.Animations.ConstraintSource a1;
         checkValueType(l, 2, out a1);
         var ret = self.AddSource(a1);
         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
 }
예제 #2
0
 static public int AddSource(IntPtr l)
 {
     try {
         UnityEngine.Animations.LookAtConstraint self = (UnityEngine.Animations.LookAtConstraint)checkSelf(l);
         UnityEngine.Animations.ConstraintSource a1;
         checkValueType(l, 2, out a1);
         var ret = self.AddSource(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int AddSource(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Animations.LookAtConstraint obj  = (UnityEngine.Animations.LookAtConstraint)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animations.LookAtConstraint));
            UnityEngine.Animations.ConstraintSource arg0 = StackTraits <UnityEngine.Animations.ConstraintSource> .Check(L, 2);

            int o = obj.AddSource(arg0);
            LuaDLL.lua_pushinteger(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }