Audio: per-SoundEffect occlusion via Steam Audio + 3D flag refactor

- New occlusion opt-in on SoundEffect: spatialized instances get a
  SteamAudioSource with raycast occlusion + frequency-dependent
  transmission (walls muffle instead of hard-mute)
- Replace SoundEffectDistanceRange asset indirection with an explicit
  _3d bool (user refactor); rolloff/distance now left to defaults
- Hey.asset: occlusion enabled

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Fable 5 committed 2026-07-11 23:33:29 +02:00
1 parent c25d0777c2
commit 706100e322
8 files changed
+21 -56

No files matched your search

+5 -3
View File
@@ -1,4 +1,3 @@
using UnityEngine;
using UnityEngine.Audio;
namespace Prototype
@@ -17,8 +16,8 @@ namespace Prototype
public bool? loop;
public bool GetLoop() => loop ?? false;
public Vector2? distanceRange;
public Vector2 GetDistanceRange() => distanceRange ?? new(30, 200);
public bool? _3d;
public bool Get3D() => _3d ?? false;
public bool? destroyOnLoad;
public bool ShouldDestroyOnLoad() => destroyOnLoad ?? true;
@@ -28,5 +27,8 @@ namespace Prototype
public bool? spatialize;
public bool GetSpatialize() => spatialize ?? false;
public bool? occlusion;
public bool GetOcclusion() => occlusion ?? false;
}
}