{"id":16207743,"url":"https://github.com/mukarillo/unitysoundmanager","last_synced_at":"2025-03-19T08:30:35.051Z","repository":{"id":126316877,"uuid":"118837740","full_name":"Mukarillo/UnitySoundManager","owner":"Mukarillo","description":"Sound manager with 3 tracks, language system, pooling system, Fade in/out effects, EventTrigger system and more.","archived":false,"fork":false,"pushed_at":"2019-09-26T06:20:32.000Z","size":18967,"stargazers_count":59,"open_issues_count":0,"forks_count":9,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-28T16:55:39.595Z","etag":null,"topics":["audio-processing","sound","soundmanager2","unity","unity3d-plugin"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mukarillo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"mukarillo","tidelift":null,"community_bridge":null,"liberapay":"mukarillo","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-01-25T00:00:25.000Z","updated_at":"2025-01-07T05:14:47.000Z","dependencies_parsed_at":"2023-06-16T06:45:32.576Z","dependency_job_id":null,"html_url":"https://github.com/Mukarillo/UnitySoundManager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnitySoundManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnitySoundManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnitySoundManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnitySoundManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mukarillo","download_url":"https://codeload.github.com/Mukarillo/UnitySoundManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976459,"owners_count":20377691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-processing","sound","soundmanager2","unity","unity3d-plugin"],"created_at":"2024-10-10T10:14:21.010Z","updated_at":"2025-03-19T08:30:30.037Z","avatar_url":"https://github.com/Mukarillo.png","language":"C#","funding_links":["https://ko-fi.com/mukarillo","https://liberapay.com/mukarillo"],"categories":[],"sub_categories":[],"readme":"# UnitySoundManager\nSimple, yet powerful, sound manager for Unity with 3 tracks, language system, pooling system, Fade in/out effects, EventTrigger system and more.\n\n## Setup Project\n![setup](https://raw.githubusercontent.com/Mukarillo/UnitySoundManager/master/Images/Screen%20Shot%202018-01-24%20at%2010.14.14%20PM.png)\nTo create an instance of SoundManager, click `Time Saver Tools\u003eSound Manager\u003e Add SoundManager`. A GameObject will be created at root with SoundManager component.\n\n# Sound Manager Properties\n![properties](https://raw.githubusercontent.com/Mukarillo/UnitySoundManager/master/Images/Screen%20Shot%202018-01-24%20at%2011.36.54%20PM.png)\n\n**Use this forever**: when checked, the GameObject won't be destroyed when changing scenes. Use this feature if you want to have only one instance of SoundManager through out the whole project.\n\n **Project FPS**: This is used to calculate events and Fade-in/out effects. If you don't know the project fps, leave it at 60.\n\n**Use Pool Feature**: when checked, an array of GameObjects will be created at editor time, avoiding instantiating at run time. If not checked, it will create a GameObject every time `SoundManager.Play` is called.\n- **Pool Quantity**: the quantity of game objects to be created. (Sound will only play if there is at least one available GameObject in the pool)\n\n**Use Multi-Language Feature** : Use this if your project aims multi-language target. It will allow you to swap between languages while in run time. When creating the sounds, you can have multiple instances with the same `name` and different language, the Sound Manager will check the current language and use the right one.\n\n## Editing Channel Tracks\n\n![editingchannel](https://raw.githubusercontent.com/Mukarillo/UnitySoundManager/master/Images/Screen%20Shot%202018-01-24%20at%2011.40.02%20PM.png)\n\nThe Sound Manager has three channels: *background*, *Effects* and *Voice*. These are just their names and you can use them to whatever kind of sound you want.\n\n**Volume**: You can setup the initial volume for the selected channel.\n\n**Play at start**: This option is only available in the *Background Channel*. It allows you to setup the background music for each scene in your project (the scene must be added to `Build Settings \u003e Scenes In Build`)\n\n## Adding Sound Clips\n![dragging](https://github.com/Mukarillo/UnitySoundManager/blob/master/Images/draganddrop.gif?raw=true)\n\nYou have two options to add `Sound Clip`, first one would be clicking `Add Sound` and than setting the name, dragging the `Sound Clip` and setting the other parameters. The second choice is to drag one (or more) `Sounds Clip` to the \"Drag here\" area, their names and clips will be filled. If you put these sounds under folders which have names like: *Background*, *Effects* or *Voice*, the `Track` will be filled automatically for you, do the same thing for `Language`. \n\n# Sound Configuration Panel\n\n![conf1](https://github.com/Mukarillo/UnitySoundManager/blob/master/Images/Screen%20Shot%202018-01-24%20at%2011.40.20%20PM.png?raw=true)\n\n**1**- Click the arrow to hide/show more options.\u003cbr /\u003e\n**2**- Sound name.\u003cbr /\u003e\n**3**- Click to preview the sound.\u003cbr /\u003e\n**4**- Click to stop previewing the sound.\u003cbr /\u003e\n**5**- The track that the sound belongs.\u003cbr /\u003e\n**6**- Click to delete the sound.\u003cbr /\u003e\n\n![conf2](https://github.com/Mukarillo/UnitySoundManager/blob/master/Images/confpanel1.jpg?raw=true)\n\n**7**- The audio clip.\u003cbr /\u003e\n**8**- Name (used to refer to this song in the source code).\u003cbr /\u003e\n**9**- Volume.\u003cbr /\u003e\n**10**- Loop toggle.\u003cbr /\u003e\n**11**- Fade in/out effects toggle.\u003cbr /\u003e\n**12**- Time to fade in/out.\u003cbr /\u003e\n\n![conf3](https://github.com/Mukarillo/UnitySoundManager/blob/master/Images/confpanel2.jpg?raw=true)\n\n**3DSound**: If the sound is not supposed to play 2d, check this toggle. Set the `Vector3` to make the sound play at a coordinate or set the `GameObject` to make the sound follow the object;\n**Track**: Set the track this sound belongs. This will be useful to mute/un-mute groups of sounds.\n**Language**: Set the language of the sound. If you call `SoundManager.Play` with the name of this sound and the `SoundManager.language` is not the same as set here, the sound will not play.\n\n![conf4](https://github.com/Mukarillo/UnitySoundManager/blob/master/Images/confpanel3.jpg?raw=true)\n\n**Trigger Event**: when checked, will try to call a function called `OnSoundTrigger` in all components attached in the `Target GameObject`. If `Time` is set to `-1`, the event will trigger at the end of the sound, if set to `0`, the event will be triggered at the start of the sound.\n\n# Coding - Functions\n \n**`SoundManager.AddSound`**\n- *Description*:\nUse this method to add sounds at run-time.\n\n- *Parameters*:\n\n|name  |type  |description  |\n|--|--|--|\n|`clip` |**AudioClip** |*The AudioClip of the sound*  |\n|`name` |**String** |*The name of the sound, used to reference it*  |\n|`soundTrack` |**Track** |*The track of the sound*  |\n|`language` |**String** |*The language of the sound*  |\n|`loop` |**Bool** |*If the sound loops or not*  |\n|`fadeIn` |**Bool** |*If the sound have fade in*  |\n|`timeToFadeIn` |**Float** |*Time for fade in*  |\n|`fadeOut` |**Bool** |*If the sound have fade out*  |\n|`timeToFadeOut` |**AudioClip** |*Time for fade out*  |\n|`is3D` |**Bool** |*If the sound is 3D*  |\n|`posFor3D` |**Vector3** |*Position coordinate for the sound*  |\n|`isTrigger` |**bool** |*If the sound have event trigger*  |\n|`triggerTime` |**float** |*Time to trigger the event (`-1` represents AudioClip.Length)*  |\n\n##  \n **`SoundManager.Play`**\n\n- *Description*:\nUse this method to play an audio clip at run-time.\n\n- *Parameters*:\n\n|name  |type  |description  |\n|--|--|--|\n|`name` |**String** |*This string is a direct reference to the created sound name*  |\n|`delay` |**Float** |*Set `0` if you want the sound to be played instantly, or set a delayed time*  |\n|`playAt` |**Float** |*Set `0` if you want the sound to be played at its start, or set a time to be played (in seconds)*  |\n|`stopAt` |**Float** |*Set `-1` if you want the sound to be stopped at its end, or set a time to be stopped (in seconds)*  |\n\n## \n\n**`SoundManager.Mute`**\n\n- *Description*:\nUse this method to mute an audio clip or track at run-time.\n\n- *Parameters*:\n\n|name  |type  |description  |\n|--|--|--|\n|`mute` |**Bool** |*Set to `true` if you want to mute and to `false` if you want to un-mute*  |\n|`clipName` |**String** |*The name of the audio clip that you want to mute/un-mute*  |\n\nor\n\n|name  |type  |description  |\n|--|--|--|\n|`mute` |**Bool** |*Set to `true` if you want to mute and to `false` if you want to un-mute*  |\n|`compareTrack` |**Track** |*The track that you want to mute/un-mute*  |\n\n## \n\n**`SoundManager.Stop`**\n\n- *Description*:\nUse this method to stop an audio at run-time. Use this method only if you don't want resume the audio clip.\n\n- *Parameters*:\n\n|name  |type  |description  |\n|--|--|--|\n|`name` |**String** |*The name of the clip that you want to stop*  |\n\n## \n\n**`SoundManager.StopAllSounds`**\n\n- *Description*:\nUse this method to stop all audios at run-time. Use this method only if you don't want resume the audio clip.\n\n- *Parameters*: `no parameters`\n\n## \n\n**`SoundManager.Volume`**\n\n- *Description*:\nUse this method to change the volume of an audio clip or track at run-time.\n\n- *Parameters*:\n\n|name  |type  |description  |\n|--|--|--|\n|`volume` |**Float** |*The volume to change, `0` means no sound and `1` means full volume*  |\n|`clipName` |**String** |*The name of the audio clip that you want to change volume*  |\n\nor\n\n|name  |type  |description  |\n|--|--|--|\n|`volume` |**Float** |*The volume to change, `0` means no sound and `1` means full volume*   |\n|`compareTrack` |**Track** |*The track that you want to change volume*  |\n\n# Coding - Variables\n\n**`SoundManager.allMuted`**: returns true if all tracks are muted.\n\n**`SoundManager.backgroundVolume`**: returns a float between 0 and 1 representing the *background track* volume. You can set the background volume in this variable also.\n\n**`SoundManager.bkgMuted`**: returns true if *background track* is muted.\n\n**`SoundManager.effectsVolume`**: returns a float between 0 and 1 representing the *effects track* volume. You can set the background volume in this variable also.\n\n**`SoundManager.efxMuted`**: returns true if *effects track* is muted.\n\n**`SoundManager.voiceVolume`**: returns a float between 0 and 1 representing the *voice track* volume. You can set the background volume in this variable also.\n\n**`SoundManager.voiceMuted`**: returns true if *voice track* is muted.\n\n**`SoundManager.fps`**: you can check or change the value of the manager fps.\n\n**`SoundManager.language`**: you can check or change the value of the manager language.\n\n# Credits\nThis asset was created by `Murillo Pugliesi Lopes`. For more information, please contact me at:\nmukarillo@gmail.com\u003cbr /\u003e\nFeel free to clone and mess around. If you feel that you want to contribute, please submit a merge request :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukarillo%2Funitysoundmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmukarillo%2Funitysoundmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukarillo%2Funitysoundmanager/lists"}