Hi
I’m Building my NumberWizard_UI game With the WebGL. After complete to make the index.html file, I open the file on Internet Explorer and the flowing massage is up:
“an error occurred running the unity content on this page. see your browser java script console for more info. the error was: access is denied”
I tried it on Unity: 5.5.4 and on Unity: 5.6.1
Any one Know the Answer to the problem?
Hi
Thank’s for your answer
I tried to upload the game to ShareMyGame.com but the Error is still up.
This is the code for the game, It’s Work fine in the local computer, when I Close it to exe file:
NumberWizard_UI code:
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class NumberWizard : MonoBehaviour {
// Use this for initialization
int min;
int max;
int guess;
int maxGuessedAllowed = 10;
public Text text;
void Start () {
StartGame();
}
void StartGame(){
min = 1;
max = 1000;
NextGuess ();
}
public void GuessHigher (){
min = guess;
NextGuess ();
}
public void GuessLower (){
max = guess;
NextGuess ();
}
void NextGuess () {
guess = Random.Range(min,max+1);
text.text = guess.ToString();
maxGuessedAllowed = maxGuessedAllowed - 1;
if(maxGuessedAllowed <=0){
Application.LoadLevel("Win");
}
}
}
If you want to .zip up the entire project and upload it here (10mb limit) I will happily take a quick look and see if there is anything I can spot.
Updated Sat Jun 17 2017 23:31
Incidentally, I applied the code formatting and preformatted text to your post so that I could see the details (links below for reference for future posts)…
Note the following;
<script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/NumberWizard_web_game.json", {onProgress: UnityProgress});
</script>
…particularly “Build/NumberWizard_web_game.json”
Would it be fair to say you didn’t add those underscore, and they were spaces originally when you built the game?
I ask because if you look at the title of the page in the HTML tags;
Hןi Rob
By your Advise I Up Load my game Code for your Check (Thanks in advance)
As you notice about the html code - the code was build by closing the *.sc file to the WebGL Type and I thought that there is something wrong in this file:
.NumberWizard_web_game.zip (4.0 MB) NumberWizard_web_game.zip (4.0 MB)