コード例 #1
0
        private void Refresh()
        {
            delayTimeField.text = sourceManager.delayTime.ToString();
            foreach (Transform item in verticalListContainer)
            {
                Destroy(item.gameObject);
            }

            Dictionary <string, VideoSourceModel> sources = sourceManager.GetAllVideoModels();

            foreach (VideoSourceModel model in sources.Values)
            {
                GameObject go = Instantiate(videoItemPrefab);
                go.transform.SetParent(verticalListContainer, false);
                go.GetComponent <VideoItemUI>().Init(model, this);
            }

            audioUrl.text = sourceManager.GetAudioURL();
            string fileName = Application.persistentDataPath + "/Documents/audio.mp3";

            if (File.Exists(fileName))
            {
                audioStatusText.text = "on disk";
            }
        }