Skip to content

Commit 5a4785e

Browse files
committed
0.1.2
1 parent 28b80ed commit 5a4785e

20 files changed

+241
-81
lines changed

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
+ [AlwaysLinkAssembly] attribute added to boostrapper
2626

2727
### Removed
28+
29+
## [0.1.2] - 2024-01-03
30+
31+
### Changed
32+
33+
* Sound.cs
34+
* AudioManager.cs
35+
36+
### Added
37+
38+
+ Fade functionality
39+
+ AudioManager.cs and Sound.cs moved into seperate SoundSystem namespace

CHANGELOG.md.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Icons.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Icons/Ico_Audio.png.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Icons/Ico_Piano.png.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Icons/Ico_Sound.png.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/Icons/Ico_Toolbox.png.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+46-10
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,53 @@ A simple unity package that contains some of my commonly reused systems
1111

1212
A utility function used to load any systems required at Runtime (e.g. `AudioManager`). In the Editor hierarchy, a GameObject named "GlobalSystems" gets added on Runtime Initalized.
1313

14-
## Audio Manager 🎹
14+
# SoundSystem
1515

16-
A manager class that utilizes `Sound` ScriptableObjects to play Audio Clips on command from scripts.
16+
Use this simple sound system by importing the `SoundSystem` namespace into a file.
17+
18+
## 🎵 Sound
19+
20+
Sound class ineherits from SctiptableObject, and represents a collection of AudioClips for a specific SFX or music track that will be played in game.
21+
22+
Each sound is automatically loaded into memory of the AudioManager when the attached MonoBehavior enters the scene.
1723

1824
| **Properties** | |
1925
| -------------- | ------------------------------------------------------------------------------- |
20-
| `Instance` | the current instance of the AudioManager class (implements _Singleton_ pattern) |
21-
| `sounds` | Array of `Sound` objects that can be played at any time |
22-
23-
| **Methods** | |
24-
| ----------- | -------------------------------------------------------------------------- |
25-
| `Play` | plays a specified sound in the current scene, if it is not already playing |
26-
| `PlayOnce` | triggers a specified sound to be played in the current scene |
27-
| `Stop` | stop a specified sound in the current scene |
26+
| `Clips` | the collection of AudioClips associated with this Sound |
27+
| `ClipType` | specifies how clips should be retrieved from this Sound |
28+
| `Mixer` | the output `AudioMixerGroup` this Sound should be played on |
29+
| `Volume` | the volume these Sounds should be played at |
30+
| `Pitch` | the pitch these Sounds should be played at |
31+
| `Loop` | toggles whether or not this Sound should repeat itself |
32+
33+
### Methods
34+
35+
`PlayOneShot` - Triggers the next clip to be played once from the current AudioManager. Useful for SFX.
36+
37+
`Play` - Plays the next clip on this Sound from the current AudioManager, if it is not already playing. Useful for Music.
38+
39+
## 🎹 AudioManager
40+
41+
The AudioManager class a Singleton MonoBehaviour that can be used to play all clips from the currently loaded Sounds in Unity.
42+
43+
Sounds can be added to the AudioManager manually in the inspector if they should remain persistantly loaded memory for the manager's lifetime, or loaded dynamically at runtime from Sound ScriptableObjects.
44+
45+
| **Properties** | |
46+
| -------------- | ------------------------------------------------------------------------------- |
47+
| `Instance` | The current instance of the AudioManager class (implements _Singleton_ pattern) |
48+
| `Persist Sounds` | Array of `Sound` objects that can be played at any time during the lifetime of the manager |
49+
| `Play On Awake` | When toggled, the manager will attempt to play the first loaded Sound in its internal array as soon as it is added OnAwake() |
50+
51+
### Methods
52+
53+
`PlayOneShot` - Plays a specified Sound as a one shot audio event from the current AudioManager. Useful for SFX.
54+
55+
`Play` - Plays a specified Sound from the current AudioManager, if it is not already playing. Useful for Music.
56+
57+
`PauseToggle` -
58+
59+
`Stop` -
60+
61+
`FadeVolume` -
62+
63+
`FadeTo` -

README.md.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Runtime.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)