Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        this.onSuccess += this.SuccessMethod;
        HttpWrapper hw = GetComponent <HttpWrapper>();

        hw.GET("http://img.juimg.com/tuku/yulantu/140703/330746-140F302191731.jpg", this.onSuccess);
    }
        /// <summary>
        /// Launch the scanning process.
        /// </summary>
        public void LaunchScanningProcess(bool ConsoleOutput, string EditorPlayerPrefKey = "")
        {
            OutputInConsole = ConsoleOutput;

            _editorPlayerPrefKey = EditorPlayerPrefKey;

            if (OutputInConsole)
            {
                Debug.Log("Project Scanner: Downloading Assets Description");
            }

            _hasError   = false;
            _isScanning = true;
            AssetsList  = new SortedDictionary <string, AssetItem>();

            _wwwWrapper = new HttpWrapper();

            WWWForm _form = new WWWForm();

            _form.AddField("UnityVersion", Application.unityVersion);
            _form.AddField("PlayMakerVersion", MyUtils.GetPlayMakerVersion());

            _wwwWrapper.GET
            (
                "http://www.fabrejean.net/projects/playmaker_ecosystem/assetsDescription"
                ,
                _form
                ,
                (WWW www) =>
            {
                if (!string.IsNullOrEmpty(www.error))
                {
                    Debug.LogError("Project Scanner: Error downloading assets definition :" + www.error);

                    _isScanning = false;
                    _hasError   = true;
                }
                else
                {
                    EditorCoroutine.start(DoScanProject(www.text));
                }
            }
            );
        }