|
@@ -144,6 +144,15 @@ export const UnityAction = {
|
|
|
}
|
|
|
},
|
|
|
};
|
|
|
+if (window.vuplex) {
|
|
|
+ window.vuplex.addEventListener('message', e => {
|
|
|
+ console.log('============================getMessageForUnity============================');
|
|
|
+ const data = JSON.parse(e.data);
|
|
|
+ console.log(data);
|
|
|
+ UnityAction.emit(data.type, data.message);
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
export function getGlobalData(key) {
|
|
|
let data;
|
|
|
try {
|