Приемлемое воспроизведение музыки

This commit is contained in:
ThomasCharester committed 2025-11-15 01:12:33 +03:00
1 parent 3020140360
commit 5c81bde5db
13 files changed
+355 -193

No files matched your search

@@ -19,7 +19,7 @@ namespace Code.Audio
_pool = new ObjectPool<AudioSource>(
createFunc: CreateItem,
// actionOnGet: OnGet,
// actionOnRelease: OnRelease,
actionOnRelease: OnRelease,
actionOnDestroy: OnDestroyItem,
collectionCheck: true, // helps catch double-release mistakes
defaultCapacity: 10,
@@ -45,6 +45,7 @@ namespace Code.Audio
// Called when an item is returned to the pool.
private void OnRelease(AudioSource source)
{
source.Stop();
//source.gameObject.SetActive(false);
}