* Set metatable for the userdata/table on the top of the stack */
| 410 | * Set metatable for the userdata/table on the top of the stack |
| 411 | */ |
| 412 | bool TryToSetMetatable(lua_State* L, const char* MetatableName, UObject* Object) |
| 413 | { |
| 414 | const auto Registry = UnLua::FLuaEnv::FindEnvChecked(L).GetClassRegistry(); |
| 415 | if (!Registry) |
| 416 | return false; |
| 417 | |
| 418 | return Registry->TrySetMetatable(L, MetatableName); |
| 419 | } |
| 420 | |
| 421 | /** |
| 422 | * Create a new userdata with padding size |
no test coverage detected