Exemple #1
0
        // Use this for initialization
        private void Start()
        {
            UrlLoader  loader  = new UrlLoader();
            UrlRequest request = new UrlRequest("http://docs.unity3d.com/ScriptReference/index.html", OnComplete, OnError);

            //UrlRequest request = new UrlRequest("http://docs.unity3d.com/xxx", OnComplete, OnError);
            loader.Load(request);
        }
Exemple #2
0
        public void LoadMidiUrl(string url)
        {
            if (State != SynthPlayerState.Stopped)
            {
                return;
            }
            Logger.Info("Start loading midi from url " + url);
            var loader = new UrlLoader();

            loader.Url      = url;
            loader.Method   = "GET";
            loader.Complete = LoadMidiBytes;
            loader.Progress = OnLoaderMidiLoad;
            try
            {
                loader.Load();
            }
            catch (Exception e)
            {
                Logger.Error("Could not load midi from url: " + e);
            }
        }