|
2 | 2 |
|
3 | 3 | ## Version 0.1.2
|
4 | 4 |
|
5 |
| -A simple unity package that contains some of my commonly reused systems |
| 5 | +This simple package contains some assets that are frequently reused across many of my Unity projects. |
| 6 | +These assets include: |
6 | 7 |
|
7 |
| -* Bootstrapper |
8 |
| -* SoundSystem |
| 8 | +* `Bootstrapper.cs` - a simple utility script used to load any persistent assets at Runtime |
| 9 | +* `SoundSystem` (preview) - namespace containing a simple Audio Manager |
9 | 10 |
|
10 |
| -## 🧰 Bootstrapper |
| 11 | +## Installation |
| 12 | +There are multiple ways this package can be installed, depending on your use case: |
11 | 13 |
|
12 |
| -A utility function used to load any systems required at Runtime (e.g. `AudioManager`). In the Editor hierarchy, a GameObject named "GlobalSystems" gets added to DontDestroyOnLoad when the runtime is initalized. |
13 |
| - |
14 |
| -# SoundSystem |
15 |
| - |
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. |
23 |
| - |
24 |
| -| **Properties** | | |
25 |
| -| -------------- | ------------------------------------------------------------------------------- | |
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 |
| -| `PersistSounds` | Array of `Sound` objects that can be played at any time during the lifetime of the manager | |
49 |
| -| `PlayOnAwake` | 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` - |
| 14 | +1. [Git URL](https://docs.unity3d.com/Manual/upm-ui-giturl.html) |
| 15 | + Simplest way to just install the whole package in a project |
| 16 | +2. [Asset Package](https://docs.unity3d.com/Manual/AssetPackages.html) |
| 17 | + Custom install the assets locally that are required for your project |
0 commit comments