Пример #1
0
    static int Child(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(Transform), typeof(string)))
        {
            Transform  arg0 = LuaScriptMgr.GetUnityObject <Transform>(L, 1);
            string     arg1 = LuaScriptMgr.GetString(L, 2);
            GameObject o    = UtilCommon.Child(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(GameObject), typeof(string)))
        {
            GameObject arg0 = LuaScriptMgr.GetUnityObject <GameObject>(L, 1);
            string     arg1 = LuaScriptMgr.GetString(L, 2);
            GameObject o    = UtilCommon.Child(arg0, arg1);
            LuaScriptMgr.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UtilCommon.Child");
        }

        return(0);
    }