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");
}
}
}
and this is the code script for the Index.html:
<!DOCTYPE html>
<html lang="en-us">
<head>
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Headers": "Accept, X-Access-Token, X-Application-Name, X-Request-Sent-Time",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
"Access-Control-Allow-Origin": "*",
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | game</title>
<link rel="shortcut icon" href="TemplateData/favicon.ico">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/NumberWizard_web_game.json", {onProgress: UnityProgress});
</script>
</head>
<body>
<div class="webgl-content">
<div id="gameContainer" style="width: 800px; height: 600px"></div>
<div class="footer">
<div class="webgl-logo"></div>
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
<div class="title">game</div>
</div>
</div>
</body>
</html>