unity版本2020  3.16

由于我们在打包出来的index.html中,没有定义gameInstance,所以调用就会报错了

在这定义一下就可以了

JS中调用

myGameInstance.SendMessage('*','*',*)

完美解决

更多推荐