Releases: jackyyang09/Simple-Unity-Audio-Manager
3.1 Release
About time for a new release! I've been using JSAM myself for the past while, building a collection of small fixes and additions. Finally got the time to compile them in one release. In retrospect, I probably should've done a bunch of smaller commits in the development branch, I'll endeavour to do that in the future.
Before upgrading, remember to make a backup of your project just in case.
When upgrading using the .unitypackage, delete your old JSAM folder first before importing the new one.
Major Changes
- You can now load and unload multiple AudioLibraries in AudioManager. This is especially useful for larger projects where you don't want all your sounds loaded on startup
- This upgrade erases the Library reference set to the AudioLibrary variable, replacing it with a new
Preloaded Libraries
field - Added new
AudioLibraryLoader
component that lets you quickly implement Library loading/unloading AudioLibrary
now has functionIsLoaded
, useful for checking if the Library is currently loaded before attempting to load/unload it- List of Loaded Libraries is shown in the AudioManager
- This upgrade erases the Library reference set to the AudioLibrary variable, replacing it with a new
- Fade In/Out and Loop Point authoring tools are now equally functional for both Music and Sound File Objects (previously Fade support for Music and Loop support for Sounds was lacking)
- You now have more access to Audio Manager's Volume settings (#37)
- Added
VolumeListener
component, letting you benefit from AudioManager's volume setting management with specific AudioSources that you control yourself. You can experiment with it in the new Extra Tips sample - Updated
VideoPlayerVolume
so it's manner of usage is similar to VolumeListener - Previously you were only able to get the Volume level of a specific channel using
AudioManagerInternal.Instance.MusicVolume
and the real Volume value used for AudioSources usingAudioManagerInternal.Instance.ModifiedMusicVolume
- Now, you can subscribe to
AudioManager.OnMusicVolumeChanged
which has been changed to pass both of those values as parameters
- Added
- Audio File Scriptable Objects are now marked
partial
to allow for more extensibility in your own projects! (This requires installing the package as .unitypackage or copying local package contents outside of the PackageCache folder)
Minor Changes
- Upgraded Sample Scenes and some code to work in Unity 6 (#43)
OnSoundPlayed
,OnMusicPlayed
andOnVoicePlayed
events now pass the ChannelHelper used to play said sounds to help facilitate post-play processing (such as getting the Transform of the played audio)- PlaySound/PlayMusic methods in Sound/Music File Objects (
sfo.PlaySound
) now return Helper components, just as they do inAudioManager.PlaySound
- Improved audio fading logic so it registers changes to Fade In/Out positions on the fly
- When the Audio Playback Tool is open, selecting any Audio File Object or AudioClip in the inspector will preview that asset in the Tool window
- Adjusted FPS Sample
- Added some explicit materials to make use in Scriptable Render Pipelines easier
- The scene is now more appealing, also the cube jumps based on World Up
- Removed AudioListener field from AudioManager since its easily found and always present
- Removed
MainMusicEnumAsInt
property
Fixes
- Fixed looping audio pre-maturely stopping when Unity loses focus (#30)
- Fixed AudioClips getting overwritten by included and generated Audio File Object Presets (#41)
- Fixed
AudioManager.FadeMusicIn
always returning the MainMusicHelper (#45) - Fixed MusicPlayer component not working properly
- Fixed AudioManager only limiting number of sounds playing when the number of playing instances is 1 over the set limit
- Fixed Audio Player components throwing an error during rendering when no AudioManager is found in the scene
- Fixed AudioPlaybackTool not properly looping audio
- Fixed Audio File Wizard throwing errors if an Audio Clip dragged into its staging area is deleted
- Fixed included and newly generated presets overwriting the
files
field of Audio File Objects - Fixed foldout nesting error in Sound File Object inspector appearing when File list was empty
- Fixed inconsistent sound enums and broken interactions in Shmup2D sample
- BaseSoundFileObject is no longer subscribed to Master Volume change events since its specific channel changing volume is sufficient
3.0.2 Hotfix
Some early work on Unity Timeline integration ended up seeping into the Release build, causing syntax errors for users who don't have the Timeline package installed
Fixes
- Early Timeline code is now hidden by a preprocessor definition. (#38)
- A way to import "addons" for Unity Timeline and other features will be added in future versions of JSAM
3.0.1 Release
Sorry for the delay, things have been hectic for me.
There have been so many fixes since the first preview release of Version 3 that we may as well skip 3.0 proper.
Changes
- You can now preview multiple Audio File Objects at the same time. Previously using the floating "Properties" window or opening two Inspector Windows to preview different Audio File Objects would not let you preview the sounds independently. But now you can!
- This allows you to use the JSAM Playback Tool as an in-Unity jukebox, for when you really like your game's soundtrack 🎶
- The Loop Point Tools foldout in Audio File Object inspectors can now be open/closed regardless of the Loop Mode
Fixes
- Fixed an issue with the "Play Random" button in the SoundFileObject Inspector's Playback Preview that caused every AudioClip except the first clip in the Files list to be demoed
- Fixed an unnecessary GC call in PlaySound (#35)
- Audio File Wizard now checks if a valid output folder is provided, disabling the "Generate" button otherwise (#28)
- Fixed the SoundFileObject and MusicFileObject inspector windows breaking if an AudioClip they rely on is deleted (#36)
- Fixed regression in BaseAudioChannelHelper that throws an error when fading in a sound
- Fixed StartingPitch property not being used where it should have been
- Adjusted the tooltip for this field, removing mentions of "negative pitches"
3.0 Alpha Preview 7
Even more fixes!
Some of these were a long time coming.
Changes
- The default Audio File Preset path is now set to
Assets/JSAMPresets
- You can change the path in
Project Settings/Audio - JSAM/Editor/Presets Path
- The default presets can still be found within the JSAM package folder. The default presets will always be loaded
- You can change the path in
- The
Stop Sounds on Scene Load
setting has been renamed toStop All Sounds on Scene Changed
. The behavior associated with this setting has been adjusted accordingly. - Added
Stop All Music on Scene Changed
setting - Added a check during Audio File preset creation that ensures the Preset path defined in the Project Settings exists.
Fixes
- Fixed a warning that appears when JSAM is imported for the first time
- Fixed AudioManager trying to do things while you're in prefab mode
- Fixed AudioManager trying to look for an AudioListener in
OnValidate
, this should cause less log messages to appear in console when loading scenes - Fixed some inspector-specific behavior with Sound/Music Player components
- Fixed Advanced Mode not being toggleable if there was no Library set in the AudioManager and the component was missing an Audio File reference
- The "use advanced mode" warning now goes away when Advanced Mode is enabled
3.0 Alpha Preview 6
More fixes!
Some more fixed than others.
Fixes
- Fixed AudioSource spatialization only happening after the sound is played
- Suppressed an error being thrown when trying to preview a Sound/Music File Object whose missing their AudioClip references
- Of course, you still should not try to use an Audio File Object that has no AudioClips
- Made playback preview time label mono-spaced so it's nicer to look at during playback
- Fixed "Select an Audio File to preview it here" label in the JSAM Playback Tool becoming black when the cursor is not hovering over it
- Fixed JSAM throwing an error when you reload the current scene and then try to change the volume
- Removed deprecated volume-related event references from Sound/Music Channel Helpers
- Made the height of the lock button the same as other buttons in the JSAM Playback Tool
- Fixed JSAMPaths having a syntax error specifically in Unity versions before 2021.3
3.0 Alpha Preview 5
A small release to compile some recent fixes to some annoying issues.
Fixes
- Fixed errors being thrown when trying to build
- Fixed null references thrown when changing volume with Unity's enter play mode option enabled
- Fixed JSAMStartupWindow not actually saving the fixed package path if it detects an invalid path
- Fixed Samples~.meta warning appearing when importing JSAM as a git URL
3.0 Alpha Preview 3
Still not very sure when to drop the alpha/preview tag from the version 3 release.
For those curious why 2 was skipped, it's because I pushed Preview 2 stealthily via editing the package manifest in the git repo without making a new Unity package.
If you're using Unity 2020 and later, try installing the package through the Package Manager to get access to updates like Preview 2 and 3 more easily
Major Changes
- Added a
ChannelOverride
property to Audio File Objects, so your SoundFileObjects can have their volume controlled by the Music slider and your MusicFileObjects can have their volume controlled by the Sound slider instead - Added a "Voice" volume channel to the
AudioManager
component- To use the new Voice volume channel, use the
ChannelOverride
parameter - Removed the volume mixer group parameters since they conflicted with the current Volume paradigm
- To use the new Voice volume channel, use the
- Improved AudioPlaybackTool
- Audio File libraries are now displayed in a narrow right-hand window
- The currently selected AudioClip/AudioObject can be locked separately from Unity's built-in inspector locks. You can use this to have an in-editor music player!
- Finished implementing the Video Volume sample
- Improved usability of
VideoPlayerVolume
component - Added Unity 2019 compatibility to JSAMPaths, JSAM should be usable in Unity 2019 again
Minor Changes
- Updated the names of template objects in the GameObject right-click dialogue
- Some Audio File Wizard settings now persist between closing/re-opening of the tool window
- Added a default Voice preset
- Added some additional feedback after the JSAMSettings asset is created
- Fixed the wording of the JSAMSettings generation dialogue
- The JSAMStartupWindow now accurately reports the current package version
- The "Reset to Default" button in the JSAM Project Settings now resets some settings, more reset buttons will be added down the road
Fixes
- Fixed null reference that sometimes occurs when audio playback ends
- Fixed
PlayMusic
not actually using themainMusic
parameter - Fixed MusicChannelHelper not Stopping playback properly, leading to unpredictable behaviour
- Fixed Music Zones not responding to Music volume changes properly
- Fixed JSAM-related paths in the Project Settings not saving properly
3.0 Alpha Release
Finally putting together a new package since JSAM 3 is approaching a production-ready state. No documentation just yet, but the new API is well-commented and there are Example scenes you can explore.
I do not recommend upgrading an existing project from JSAM 2 to 3 as a lot of script names have changed and so most of your references will break and Sound/Music File Objects will have to be re-created.
Remember to check out the new Audio File Wizard to help convert all your AudioClips into Sound/Music File Objects!
Below is a (non-exhaustive) list of changes
Changes
- AudioFileMusic/AudioFileObjects are now called MusicFileObject/SoundFileObject respectively
- Added StopSoundIfPlaying and StopSoundIfLooping
- Added many many static methods to AudioManager as shorthands for commonly used API
- ie.
PlaySound
,PlayMusic
- ie.
- Expanded usability of Sound/Music File Objects
- You can pass Sound/Music File Objects into
AudioManager.Play
- Added a
.Play()
shorthand to Sound/Music File Objects - File Objects can be used in most helper components (AudioEvents, SoundPlayer, MusicPlayer etc.)
- You can pass Sound/Music File Objects into
- Added Max Playing Instance property to define the maximum number of a specific sound to be played at once.
- Added support for AudioMixers
- Added new Static Events to AudioManager component
- OnAudioManagerInitialized
- OnSoundPlayed, OnMusicPlayed
- OnMasterVolumeChanged, OnMusicVolumeChanged, OnSoundVolumeChanged
- Audio Libraries are now a ScriptableObject. You can share them between different AudioManager instances or even between projects
- Added AudioFileWizard to allow mass conversion of many AudioClip assets to Sound/Music File Objects.
- Accessible via
Window -> JSAM -> Audio File Wizard
- Accessible via
- Added
VideoPlayerVolume
component.- Add it next to a
VideoPlayer
component to have the VideoPlayer conform with JSAM's volume settings
- Add it next to a
- AudioMusicZones now supports having multiple different zones play the same sound
- Moved AudioManager settings into ProjectSettings
- Changed AudioChannel instantiation to use default AudioSource components and to be created during runtime without supplying a prefab.
- A prefab override for Sound/Music channels can be specified by the user in the ProjectSettings
- Abbreviated main package folder to JSAM
- Removed File Library mode from Sound File Objects, all AudioClips are now stored in a "Files" array
- Removed 3D music as a separate music type. Music can now be spatialized
- Removed
PlaySoundLoop
invocation, looping property is now specified in SoundFileObjects - Moved most properties from AudioPlayer and AudioPlayerMusic to their respective Audio File Objects
- Capitalized the instance in AudioManager.Instance
- Adjusted the font size of Quick Reference Guide text, font size can be adjusted in the Project Settings
- Removed "Category" dropdown from Audio File object inspector
- Removed "Audio File Object" label and name fields from Audio File object inspectors, now use the name of the ScriptableObject
- Added warning beneath Audio Playback Preview window to disable the "mute audio" option in the Game View to preview audio
- Added a lot more useful logging
Fixes
- Fixed Audio Particles making no distinction between playing on Particle emit and death
- Fixed double-clicking an asset to open the audio in the AudioPlayer not re-rendering the audio waveform
- Fixed sounds rarely cutting each off when a Sound marked as Spam priority was being played constantly
- Fixed Audio Music Zone continuing to play after switching scenes
Playback Tool Fixes
The fastest new release in the West
Bug Fixes
- Fixed AudioPlaybackTool not updating the waveform when you manually play a different AudioClip in the AudioFileObject's library
- Fixed AudioPlaybackTool throwing an error when you wanted to preview an AudioFileObject in library mode but has it's non-library AudioClip field empty
- Fixed AudioPlaybackTool throwing an error when trying to preview an Audio Object with no AudioClips
- Hid some in-development features that snuck through in the previous build
Minor Fix
October has been a real busy month, but if there are things to fix then they need to be fixed!
Bug Fix
- Fixed Audio File Objects and Audio File Music Objects throwing an error in cases where an AudioManager wasn't present and/or no enums were generated.