Closed RPG3D closed 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?
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.
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?