MCPcopy Create free account
hub / github.com/Tencent/UnLua / NewScriptContainer

Function NewScriptContainer

Plugins/UnLua/Source/UnLua/Private/LuaCore.cpp:484–489  ·  view source on GitHub ↗

* Create a new userdata for a script container */

Source from the content-addressed store, hash-verified

482 * Create a new userdata for a script container
483 */
484void* NewScriptContainer(lua_State *L, const FScriptContainerDesc &Desc)
485{
486 void* Userdata = NewUserdataWithContainerTag(L, Desc.GetSize());
487 luaL_setmetatable(L, Desc.GetName()); // set metatable
488 return Userdata;
489}
490
491/**
492 * Find a cached script container or create a new one

Callers

nothing calls this directly

Calls 4

luaL_setmetatableFunction · 0.85
GetSizeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected