Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why LuaRef calls function after closing the application? #48

Closed
iamfobey opened this issue Dec 31, 2022 · 2 comments
Closed

Why LuaRef calls function after closing the application? #48

iamfobey opened this issue Dec 31, 2022 · 2 comments

Comments

@iamfobey
Copy link

Hello!

I added ScriptComponent to my ecs abstraction and I call OnCreate function when user add ScriptComponent to entity, but lua function not calls in runtime (but calls when app closing).

img1
img2
img3
img4
img5

@iamfobey
Copy link
Author

iamfobey commented Jan 1, 2023

I use spdlog for logging, but lua use standart cout func.

@iamfobey iamfobey closed this as completed Jan 1, 2023
@kunitoki
Copy link
Owner

kunitoki commented Jan 2, 2023

You can easily register a print method in the global lua namespace using luabridge3 that will call spdlog instead of printf, this way unifying your app and scripting log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants