Пример #1
0
    public void OnSendToHost()
    {
        if (fileSlot == null)
        {
            fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>();
        }

        if (fileType == FileType.Text)
        {
            fileSlot.CmdUploadTxt(fileSlot.txtFileData);
        }
        else if (fileType == FileType.Wav)
        {
            StartCoroutine(fileSlot.UploadWavCoroutine(true));
        }
    }
Пример #2
0
 public void OnSendToHost()
 {
     if (fileSlot == null)
     {
         fileSlot = GameObject.Find("FileSlot(Clone)").GetComponent <FileSlot>();
     }
     Debug.Log("[Client]OnSendToHost.");
     StartCoroutine(fileSlot.UploadWavCoroutine(true));
     Debug.Log("[Client]OnSendToHost Finished.");
 }
Пример #3
0
    private IEnumerator GetTxt_SendWav_Routine(FileSlot fileSlot)
    {
        while (true)
        {
            if (File.Exists(Path.Combine(dataPath, "result.wav")))
            {
                break;
            }
            Debug.Log(File.Exists(Path.Combine(dataPath, "result.wav")));
            yield return(null);
        }

        yield return(StartCoroutine(fileSlot.WavEncodingCoroutine("result")));

        yield return(StartCoroutine(fileSlot.UploadWavCoroutine(false)));
    }