Пример #1
0
 static int Instantiate(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         BaseBehaviour      obj  = (BaseBehaviour)ToLua.CheckObject <BaseBehaviour>(L, 1);
         UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 2);
         UnityEngine.Object o    = obj.Instantiate(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }