public void PlayBGM(string name) { if (mBgAudioAsset != null) { mBgAudioAsset.RemoveRef(); } mBgAudioAsset = Load(name) as AudioAsset; if (mBgAudioAsset == null) { return; } mBgAudioSource.clip = mBgAudioAsset.GetAsset(); mBgAudioAsset.AddRef(); mOldBgmName = name; if (MusicFlag && mBgAudioSource.clip != null) { mBgAudioSource.Play(); } }