Esempio n. 1
0
    public static AudioClip GetAudioClip(string abPath, string assetName)
    {
        string    key       = abPath + "_" + assetName;
        AudioClip audioClip = null;

        myAudioClips.TryGetValue(key, out audioClip);
        if (audioClip == null && abManager != null)
        {
            audioClip = abManager.LoadAudioClipAsset(abPath, assetName);
            if (audioClip != null)
            {
                myAudioClips.Add(key, audioClip);
            }
        }
        return(audioClip);
    }