MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / USluaTestCase

Method USluaTestCase

Source/democpp/SluaTestCase.cpp:331–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331USluaTestCase::USluaTestCase(const FObjectInitializer& ObjectInitializer)
332 : Super(ObjectInitializer)
333{
334 this->Value=2048;
335 using namespace NS_SLUA;
336 REG_EXTENSION_METHOD(USluaTestCase,"SetArrayStrEx",&USluaTestCase::SetArrayStrEx);
337 REG_EXTENSION_METHOD_IMP(UObject,"IsA",{
338 CheckUD(UObject,L,1);
339 auto clazz = LuaObject::checkUD<UClass>(L,2);
340 bool ret = UD->IsA(clazz);
341 return LuaObject::push(L,ret);
342 });
343 REG_EXTENSION_METHOD(USluaTestCase, "constRetFunc", &USluaTestCase::constRetFunc);
344 REG_EXTENSION_METHOD(USluaTestCase, "inlineFunc", &USluaTestCase::inlineFunc);
345
346 info.obj = this;
347 info.name = UTF8_TO_TCHAR("女战士");
348 info.id = 1001001;
349 info.level = 12;
350 info.pos = { 1,2,3,4 };
351 info.ids = { 1,2,3,4 };
352
353 userInfo.Add(1, info);
354
355 weakptr = NewObject<UTestObject>(this,TEXT("TestUObject"));
356}
357
358void USluaTestCase::setupfoo(UObject* obj) {
359 foos.Add(obj);

Callers

nothing calls this directly

Calls 2

pushFunction · 0.50
AddMethod · 0.45

Tested by

no test coverage detected