lsc před 3 roky
rodič
revize
60aa8b71bd
4 změnil soubory, kde provedl 7 přidání a 1 odebrání
  1. 3 0
      Assets/WebGLTemplates/template/index.html
  2. binární
      Library/ArtifactDB
  3. binární
      Library/SourceAssetDB
  4. 4 1
      dist/index.html

+ 3 - 0
Assets/WebGLTemplates/template/index.html

@@ -33,6 +33,9 @@
       // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
     }, (progress) => {}).then((unityInstance) => {
       myGameInstance = unityInstance;
+      window.parent.postMessage({
+        success: 1
+      }, '*');
     });
     window.onload = function () {
       Reset();

binární
Library/ArtifactDB


binární
Library/SourceAssetDB


+ 4 - 1
dist/index.html

@@ -33,6 +33,9 @@
       // devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
     }, (progress) => {}).then((unityInstance) => {
       myGameInstance = unityInstance;
+      window.parent.postMessage({
+        success: 1
+      }, '*');
     });
     window.onload = function () {
       Reset();
@@ -52,7 +55,7 @@
     }
 
     window.addEventListener('message', function (e) { // 监听 message 事件
-      if(e.data.type){
+      if (e.data.type) {
         send(e.data.type);
       }
     });