Can i send msg from native?
I need to change sprite animation and disable/enable sprite.
msg.post("#sprite", "play_animation", {id = hash("jump")})
Can i send msg from native?
I need to change sprite animation and disable/enable sprite.
msg.post("#sprite", "play_animation", {id = hash("jump")})
You would have to set up a Lua function “message relay” to callback to and then make that function send the message I think? DefOS has example of Lua function callback with the function to check if cursor is within window.
You should be able to get the msg.post function from the global table via the Lua C API and invoke the function from C. Never tried to do it but it should work. It’s kinda hacky and I would much rather that our Defold SDK provides this.