|
@@ -145,11 +145,14 @@ export const UnityAction = {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
+alert(window.vuplex);
|
|
if (window.vuplex) {
|
|
if (window.vuplex) {
|
|
|
|
+ alert('--------');
|
|
window.vuplex.addEventListener('message', (e) => {
|
|
window.vuplex.addEventListener('message', (e) => {
|
|
console.log(
|
|
console.log(
|
|
'============================getMessageForUnity============================',
|
|
'============================getMessageForUnity============================',
|
|
);
|
|
);
|
|
|
|
+ alert(data.message);
|
|
const data = JSON.parse(e.data);
|
|
const data = JSON.parse(e.data);
|
|
console.log(data);
|
|
console.log(data);
|
|
UnityAction.emit(data.type, data.message);
|
|
UnityAction.emit(data.type, data.message);
|