J ai moi aussi le même message
the referenced script on this behaviour is missing
pourvez m 'aider merci
http://www.wuala.com/namursite/z-galeri ... s%202.zip/
en fichiers zip , le script pour faire du streaming à partir du web
il ne charge le pas le fichier ( .unity3d ) sur le serveur ? , mais l 'autre scène .
Code : Tout sélectionner
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class scene1 : MonoBehaviour {
int progress;
void Start()
{
string url = "http://namursite.be/1objets/scene1.unity3d";
StartCoroutine(StartDownloadScene(url));
}
void Update()
{
}
void OnGUI()
{
Vector2 pos = new Vector2(20, 40);
Vector2 size = new Vector2(360, 10);
GUIStyle customStyle = new GUIStyle();
Texture2D tex = new Texture2D(10, 10);
tex.SetPixel(10, 10, Color.gray);
customStyle.normal.background = tex;
if (progress != 100)
{
GUILayout.Label(progress + "%");
GUI.BeginGroup(new Rect(pos.x, pos.y, progress, size.y));
// Define progress bar texture within customStyle under Normal > Background
GUI.Box(new Rect(0, 0, size.x, size.y), "", customStyle);
// Always match BeginGroup calls with an EndGroup call
GUI.EndGroup();
}
}
IEnumerator StartDownloadScene(string url)
{
WWW download = new WWW(url);
while (!download.isDone)
{
//Ici on gère la barre de progression
progress = System.Convert.ToInt32(download.progress * 100);
//On attend sagement la fin du téléchargement
yield return null;
}
//On charge la scène ainsi téléchargée.
Application.LoadLevelAdditive("scene1");
}
}
krys64 , je suis content de tombé sur vous ,
vous avez souvent de bons tuyaux sur la toile :-)
merci d'avance .