private static int CreateHeroPrefab(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 7);
            PrefabLoader prefabLoader      = (PrefabLoader)ToLua.CheckObject(L, 1, typeof(PrefabLoader));
            string       name              = ToLua.CheckString(L, 2);
            string       parentName        = ToLua.CheckString(L, 3);
            string       nameInScene       = ToLua.CheckString(L, 4);
            string       layerName         = ToLua.CheckString(L, 5);
            bool         removeBoxCollider = LuaDLL.luaL_checkboolean(L, 6);
            LuaFunction  func              = ToLua.CheckLuaFunction(L, 7);
            prefabLoader.CreateHeroPrefab(name, parentName, nameInScene, layerName, removeBoxCollider, func);
            result = 0;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }