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

Method BeginPlay

Source/democpp/SluaTestActor.cpp:18–28  ·  view source on GitHub ↗

Called when the game starts or when spawned

Source from the content-addressed store, hash-verified

16
17// Called when the game starts or when spawned
18void ASluaTestActor::BeginPlay()
19{
20 auto gi = this->GetGameInstance();
21 Super::BeginPlay();
22 NS_SLUA::LuaState* ls = NS_SLUA::LuaState::get(GetGameInstance());
23 ls->set("some.field.x", 101);
24 ls->set("somefield", 102);
25 ls->doFile("Test");
26 ls->set("some.field.z", 104);
27 ls->call("begin",this->GetWorld(),this);
28}
29
30// Called every frame
31void ASluaTestActor::Tick(float DeltaTime)

Callers

nothing calls this directly

Calls 4

doFileMethod · 0.80
callMethod · 0.80
getFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected