Моя мгновенная игра на фейсбуке не может быть загружена на iphone (отлично работает на Android) - PullRequest
0 голосов
/ 27 марта 2019

У меня проблема с созданной игрой webgl с использованием Unity.Игра отлично работает как мгновенная игра на Android на устройствах Android, но не может быть загружена на iphone, она застревает на числе менее 90%.

Это мой index.html:

<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Unity WebGL Player | Helix Jump</title>
    <link rel="shortcut icon" href="TemplateData/favicon.ico">
    <link rel="stylesheet" href="TemplateData/style.css">
    <script src="TemplateData/UnityProgress.js"></script>  

       <script src="https://connect.facebook.net/en_US/fbinstant.6.1.js"></script>
    <script src="Build/UnityLoader.js"></script>

    <script>
        var gameInstance;
        FBInstant.initializeAsync().then(function() { 
        gameInstance = UnityLoader.instantiate("gameContainer", "Build/facebook-platform.json", {onProgress: UnityProgress});
       });

      /*var gameInstance = UnityLoader.instantiate("gameContainer", "Build/facebook-platform.json", {onProgress: UnityProgress});*/
    </script>
  </head>
  <body>
    <div class="webgl-content">
      <div id="gameContainer" style="width: 960px; height: 600px"></div>
      <div class="footer">
        <div class="webgl-logo"></div>
        <div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
        <div class="title">Helix Jump</div>
      </div>
    </div>
  </body>
</html>

А это мой скрипт загрузки:

function UnityProgress(gameInstance, progress) {
  if (!gameInstance.Module)
    return;
  if (!gameInstance.logo) {
    gameInstance.logo = document.createElement("div");
    gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle;
    gameInstance.container.appendChild(gameInstance.logo);
  }
  if (!gameInstance.progress) {    
    gameInstance.progress = document.createElement("div");
    gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle;
    gameInstance.progress.empty = document.createElement("div");
    gameInstance.progress.empty.className = "empty";
    gameInstance.progress.appendChild(gameInstance.progress.empty);
    gameInstance.progress.full = document.createElement("div");
    gameInstance.progress.full.className = "full";
    gameInstance.progress.appendChild(gameInstance.progress.full);
    gameInstance.container.appendChild(gameInstance.progress);
  }
  gameInstance.progress.full.style.width = (100 * progress) + "%";
  gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
    FBInstant.setLoadingProgress(progress*100);
  if (progress == 1){

      FBInstant.startGameAsync()
          .then(function() {
           console.log('Game Started');
          });

  }
    gameInstance.logo.style.display = gameInstance.progress.style.display = "none";
}

Я что-то не так сделал?Спасибо за помощь.

...