We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is my js code
import { createApp } from 'vue' import App from './App.vue' function on_init() { console.log("Ready") } register_plugin = function (importObject) { importObject.env.perform_demo = function () { console.log("Called from rust") }; } miniquad_add_plugin({ register_plugin, on_init }); createApp(App).mount('#app')
It's supposed to register a function to be called by Rust later on in this code
extern "C" { fn perform_demo(); } #[macroquad::main("Coder")] async fn main() { unsafe { perform_demo(); }
It continues to give this in the console
The text was updated successfully, but these errors were encountered:
Hello! How and where do you launch your macroquad application?
You must make sure load() is called after all miniquad_add_plugin calls. Otherwise your function will not be imported.
load()
miniquad_add_plugin
Sorry, something went wrong.
Thank you. That does the trick
Nice! If the issue is resolved, I suggest closing it :)
No branches or pull requests
This is my js code
It's supposed to register a function to be called by Rust later on in this code
It continues to give this in the console
The text was updated successfully, but these errors were encountered: