Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to manually toggle STEAMAUDIO_DISABLED define #283

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TsFreddie
Copy link
Contributor

This is the implementation of an idea proposed here: #282 (comment) which is a follow up to #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:

  • 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

Finally a screenshot for good measure:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant