Example #1
0
        public void StartLoad(
            EntityManager entityManager,
            Entity e,
            ref AudioClip audioClip,
            ref AudioHTMLClip audioHtmlClip,
            ref AudioClipLoadFromFile loader,
            ref AudioHTMLLoading loading)
        {
            if (!entityManager.HasComponent <AudioClipLoadFromFileAudioFile>(e))
            {
                audioHtmlClip.clipID = 0;
                audioClip.status     = AudioClipStatus.LoadError;
                return;
            }

            string path = entityManager.GetBufferAsString <AudioClipLoadFromFileAudioFile>(e);

            audioHtmlClip.clipID = ++SharedIDPool.Value.Data.clipID;
            AudioHTMLNativeCalls.StartLoad(path, audioHtmlClip.clipID);
            audioClip.status = AudioClipStatus.Loading;
        }