The basic idea is to drop automatic scripting symbol defines in favor of warning messages and tools to toggle Steam Audio on and off.
Implementation details:
Flipped the define symbol from ~STEAMAUDIO_ENABLED~ to STEAMAUDIO_DISABLED
Added prompt messages in Steam Audio component inspectors to notify user Steam Audio's status and/or warning messages about native plugins' availability. This is impletment with a new SteamAudioEditor base class
Implemented a plugin lookup routine to detect native plugin availability. This may cover the case when user build their own binary and imported them (which currently seems unlikely) or the case where Valve is able to provide console binaries through a console partnership program
Now Steam Audio code will always be available in Unity Editor to enable editing and baking even when a unsupported target is selected, and Steam Audio will still dry run in Play Mode if disabled. More specifically:
Data classes are wrapped with #if UNITY_EDITOR || !STEAMAUDIO_DISABLED
Unity components excluding any seriailzied field is also wrapped with #if UNITY_EDITOR || !STEAMAUDIO_DISABLED
Unity life-cycle hooks are wrapped with an additional !STEAMAUDIO_DISABLED to force Steam Audio to dry run in Editor if a unsupported target is selected
This is the implementation of an idea proposed here: https://github.com/ValveSoftware/steam-audio/issues/282#issuecomment-1782196709 which is a follow up to https://github.com/ValveSoftware/steam-audio/pull/280
The basic idea is to drop automatic scripting symbol defines in favor of warning messages and tools to toggle Steam Audio on and off.
Implementation details:
STEAMAUDIO_ENABLED
~ toSTEAMAUDIO_DISABLED
SteamAudioEditor
base class#if UNITY_EDITOR || !STEAMAUDIO_DISABLED
#if UNITY_EDITOR || !STEAMAUDIO_DISABLED
!STEAMAUDIO_DISABLED
to force Steam Audio to dry run in Editor if a unsupported target is selectedFinally a screenshot for good measure: