protected override void Awake()
        {
            base.Awake();

            audioClipAssets       = AudioClipAssetCache.LoadAssetCache <AudioClipAssetCache>();
            audioMixerGroupAssets = AudioMixerGroupAssetCache.LoadAssetCache <AudioMixerGroupAssetCache>();
        }
 public void ClearAssetCache()
 {
     AudioClipAssetCache.GetOrCreateAssetCache <AudioClipAssetCache>().ClearAssetCache();
     AudioMixerGroupAssetCache.GetOrCreateAssetCache <AudioMixerGroupAssetCache>().ClearAssetCache();
 }
Example #3
0
 public void SaveAssets()
 {
     AudioClipAssetCache.GetOrCreateAssetCache <AudioClipAssetCache>().SaveAssets();
     AudioMixerGroupAssetCache.GetOrCreateAssetCache <AudioMixerGroupAssetCache>().SaveAssets();
 }
Example #4
0
 private void Start()
 {
     audioClipAssets       = AudioClipAssetCache.LoadAssetCache <AudioClipAssetCache>();
     audioMixerGroupAssets = AudioMixerGroupAssetCache.LoadAssetCache <AudioMixerGroupAssetCache>();
     StateSynchronizationSceneManager.Instance.RegisterService(this, new ComponentBroadcasterDefinition <AudioSourceBroadcaster>(typeof(AudioSource)));
 }