asqbtcupid / unreal.lua

lua solution for UnrealEngine4
MIT License
300 stars 98 forks source link

Can I get the pointer of the table represented object? #26

Closed RPG3D closed 6 years ago

RPG3D commented 6 years ago

In most case, I want to call a C++ function in lua, and the C++ function need a pointer, such as UGameplayStatics::GetGameInstance(UObject* WorldContext), and in GameMode.lua, the self is a table? how can I get the light userdata of GameMode?

asqbtcupid commented 6 years ago

you can just pass the table to the function.The framework will switch the table to the c++ object.

and self.cppinstance is the c++ object.