Ejemplo n.º 1
0
    public IEnumerator UploadFile(string file)
    {
        // If we're already using this ES2Web object, throw error.
        CheckWWWUsage();

        www = new WWW(settings.filenameData.fullString, CreateUploadForm(ES2.LoadRaw(file)));

        yield return(www);

        getError();
        isDone = true;
    }
Ejemplo n.º 2
0
        // load file
        public ProtoBattleVideoInfo LoadVideo(int id)
        {
            ProtoBattleVideoInfo item = null;
            string file = GetVideoPath(id);

            if (ES2.Exists(file))
            {
                byte[] bytes = ES2.LoadRaw(file);
                item = CreateVideo(bytes);

                item.view_count = LoadWatchCount(item.uid_local);
            }
            return(item);
        }
Ejemplo n.º 3
0
        public WarRecordIOInfo LoadInfo()
        {
            WarRecordIOInfo info = null;

            if (ES2.Exists(InfoPath))
            {
                byte[] bytes = ES2.LoadRaw(InfoPath);
                info = WarRecordIOInfo.Create(bytes);
            }
            else
            {
                info = new WarRecordIOInfo();
            }

            return(info);
        }
Ejemplo n.º 4
0
    public IEnumerator UploadFile(string file)
    {
        // If we're already using this ES2Web object, throw error.
        CheckWWWUsage();

        using (var webRequest = UnityWebRequest.Post(settings.filenameData.filePath, CreateUploadForm(ES2.LoadRaw(file))))
        {
            yield return(SendWebRequest(webRequest));

            getError();
        }
        isDone = true;
    }