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

Method Register

Plugins/UnLua/Source/UnLua/Public/UnLuaEx.h:201–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 struct FExportedProperty : public IExportedProperty, public TSharedFromThis<FExportedProperty>
200 {
201 virtual void Register(lua_State *L) override
202 {
203 // make sure the meta table is on the top of the stack
204 lua_pushstring(L, TCHAR_TO_UTF8(*Name));
205 const auto Userdata = NewSmartPointer(L, sizeof(TSharedPtr<FExportedProperty>), "TSharedPtr");
206 new(Userdata) TSharedPtr<FExportedProperty>(this->AsShared());
207 lua_rawset(L, -3);
208 }
209
210 virtual FString GetName() const override { return Name; }
211

Callers

nothing calls this directly

Calls 3

lua_pushstringFunction · 0.85
NewSmartPointerFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected