コード例 #1
0
ファイル: FreeViewer.cs プロジェクト: yinjuechen/IMR-Scripts
    public void PlayAnnotation()
    {
        string frame     = "Stitched " + string.Format("{0:d3}", currentFrame + 1);
        string voicefile = databaseControl.AnnotationContains(currentFile, frame);

        if (voicefile == null)
        {
            return;
        }
        Debug.LogWarning(voicefile);
        if (!sound.isPlaying)
        {
            sound.clip = Resources.Load("Sounds/" + voicefile) as AudioClip;
            sound.Play();
            Debug.LogWarning("Play Voice File");
        }
    }