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

Function ScriptStruct_CheckParam

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

Source from the content-addressed store, hash-verified

1631}
1632
1633FClassDesc* ScriptStruct_CheckParam(lua_State *L)
1634{
1635 FClassDesc *ClassDesc = (FClassDesc*)lua_touserdata(L, lua_upvalueindex(1));
1636 if (!ClassDesc)
1637 {
1638 UE_LOG(LogUnLua, Log, TEXT("ScriptStruct : Invalid FClassDesc!"));
1639 return NULL;
1640 }
1641
1642 UScriptStruct *ScriptStruct = ClassDesc->AsScriptStruct();
1643 if (!ScriptStruct)
1644 {
1645 // UE_LOG(LogUnLua, Log, TEXT("ScriptStruct : ClassDesc type is not script struct(Name : %s, Address : %p)"), *ClassDesc->GetName(),ClassDesc);
1646 return NULL;
1647 }
1648
1649 return ClassDesc;
1650}
1651
1652/**
1653 * Generic closure to create a UScriptStruct instance

Callers 5

ScriptStruct_NewFunction · 0.85
ScriptStruct_DeleteFunction · 0.85
ScriptStruct_CopyFromFunction · 0.85
ScriptStruct_CopyFunction · 0.85
ScriptStruct_CompareFunction · 0.85

Calls 2

lua_touserdataFunction · 0.85
AsScriptStructMethod · 0.80

Tested by

no test coverage detected