Beispiel #1
0
    public static AudioBank Load(AudioBankLink bankLink)
    {
        if (bankLink == null)
        {
            return(null);
        }
        var bank = SaveAndLoad.LoadAudioBank(bankLink.ID);

        if (Application.isPlaying && InstanceFinder.DataManager != null)
        {
            InstanceFinder.DataManager.BankIsLoaded(bank);
            for (int i = 0; i < bank.Clips.Count; i++)
            {
                (bank.Clips[i].Node.NodeData as AudioData).Clip = bank.Clips[i].Clip;
            }
        }
        return(bank);
    }