calling vue js function from unity
akbarism opened this issue · 3 comments
akbarism commented
can unity call the function in vue js?
so I have a case where when the game is finished, vue knows that and runs the function,
KennyTech commented
HELP DID YOU FIGURE IT OUT?
votetake commented
Documentation on Unity Portal WebGL: Interacting with browser scripting
TL;DR: anywhere in your application, you can declare functions that Unity will then call. Example declare on created
or mounted
methods and when call it from Unity
created() {
window.gameFinished = function () {
console.info('window.gameFinished');
}
}
votetake commented
Or see @bondythegreat comment in a similar issue