net.dreditor.audio 0.0.0-stage → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ClearAudioSourceOnTitleScreen.cs +51 -0
- package/ClearAudioSourceOnTitleScreen.cs.meta +11 -0
- package/CreditsMusic.cs +64 -0
- package/CreditsMusic.cs.meta +11 -0
- package/CreditsMusicUnity.cs +22 -0
- package/CreditsMusicUnity.cs.meta +11 -0
- package/DREditor.Audio.asmdef +19 -0
- package/DREditor.Audio.asmdef.meta +7 -0
- package/EnvironmentSFXMananger.cs +160 -0
- package/EnvironmentSFXMananger.cs.meta +11 -0
- package/EnvironmentSFXManangerBase.cs +24 -0
- package/EnvironmentSFXManangerBase.cs.meta +11 -0
- package/Music.cs +27 -0
- package/Music.cs.meta +11 -0
- package/MusicFMOD.cs +32 -0
- package/MusicFMOD.cs.meta +11 -0
- package/MusicManager.cs +436 -0
- package/MusicManager.cs.meta +11 -0
- package/MusicManagerBase.cs +115 -0
- package/MusicManagerBase.cs.meta +11 -0
- package/MusicSaver.cs +127 -0
- package/MusicSaver.cs.meta +11 -0
- package/MusicTextHandler.cs +119 -0
- package/MusicTextHandler.cs.meta +11 -0
- package/OnVoiceLineSettingChanged.cs +69 -0
- package/OnVoiceLineSettingChanged.cs.meta +11 -0
- package/OptionVolume.cs +76 -0
- package/OptionVolume.cs.meta +11 -0
- package/PlaySelectAudioOnUIChange.cs +42 -0
- package/PlaySelectAudioOnUIChange.cs.meta +11 -0
- package/PlaySubmitSFXOnClick.cs +23 -0
- package/PlaySubmitSFXOnClick.cs.meta +11 -0
- package/Playlist.cs +81 -0
- package/Playlist.cs.meta +11 -0
- package/PlaylistEditor.cs +358 -0
- package/PlaylistEditor.cs.meta +11 -0
- package/PlaylistFMOD.cs +39 -0
- package/PlaylistFMOD.cs.meta +11 -0
- package/SFXManager.cs +348 -0
- package/SFXManager.cs.meta +11 -0
- package/SFXManagerBase.cs +38 -0
- package/SFXManagerBase.cs.meta +11 -0
- package/Samples/Audio_Event_Save_Handler.prefab +57 -0
- package/Samples/Audio_Event_Save_Handler.prefab.meta +7 -0
- package/Samples/Credits_Music_Unity.prefab +66 -0
- package/Samples/Credits_Music_Unity.prefab.meta +7 -0
- package/Samples/Dialogue_Click_Sound_Player_DRE.prefab +76 -0
- package/Samples/Dialogue_Click_Sound_Player_DRE.prefab.meta +7 -0
- package/Samples/Environment_SFX_Manager.prefab +146 -0
- package/Samples/Environment_SFX_Manager.prefab.meta +7 -0
- package/Samples/Environment_SFX_Manager_Shell.prefab +96 -0
- package/Samples/Environment_SFX_Manager_Shell.prefab.meta +7 -0
- package/Samples/Environment_Source.prefab +130 -0
- package/Samples/Environment_Source.prefab.meta +7 -0
- package/Samples/Music_Manager.prefab +146 -0
- package/Samples/Music_Manager.prefab.meta +7 -0
- package/Samples/Music_Manager_Shell.prefab +75 -0
- package/Samples/Music_Manager_Shell.prefab.meta +7 -0
- package/Samples/Music_Source.prefab +144 -0
- package/Samples/Music_Source.prefab.meta +7 -0
- package/Samples/On_Voice_Line_Setting_Changed.prefab +53 -0
- package/Samples/On_Voice_Line_Setting_Changed.prefab.meta +7 -0
- package/Samples/Play_Select_Audio_On_UI_Change.prefab +46 -0
- package/Samples/Play_Select_Audio_On_UI_Change.prefab.meta +7 -0
- package/Samples/SFX_Manager.prefab +397 -0
- package/Samples/SFX_Manager.prefab.meta +7 -0
- package/Samples/SFX_Manager_Shell.prefab +53 -0
- package/Samples/SFX_Manager_Shell.prefab.meta +7 -0
- package/Samples/SFX_Source.prefab +130 -0
- package/Samples/SFX_Source.prefab.meta +7 -0
- package/Samples/Select_SFX_On_Setting_Changed.prefab +51 -0
- package/Samples/Select_SFX_On_Setting_Changed.prefab.meta +7 -0
- package/Samples/Sound_Manager.prefab +473 -0
- package/Samples/Sound_Manager.prefab.meta +7 -0
- package/Samples/Sound_Manager_Events.prefab +261 -0
- package/Samples/Sound_Manager_Events.prefab.meta +7 -0
- package/Samples/Sound_Manager_Shell.prefab +370 -0
- package/Samples/Sound_Manager_Shell.prefab.meta +7 -0
- package/Samples/Sound_Player_DRE.prefab +47 -0
- package/Samples/Sound_Player_DRE.prefab.meta +7 -0
- package/Samples/StopAllAudio.asset +14 -0
- package/Samples/StopAllAudio.asset.meta +8 -0
- package/Samples/UI_Cancel_Source.prefab +130 -0
- package/Samples/UI_Cancel_Source.prefab.meta +7 -0
- package/Samples/UI_Select_Source.prefab +130 -0
- package/Samples/UI_Select_Source.prefab.meta +7 -0
- package/Samples/UI_Submit_Source.prefab +130 -0
- package/Samples/UI_Submit_Source.prefab.meta +7 -0
- package/Samples/Voice_SFX_Manager.prefab +146 -0
- package/Samples/Voice_SFX_Manager.prefab.meta +7 -0
- package/Samples/Voice_SFX_Manager_Shell.prefab +49 -0
- package/Samples/Voice_SFX_Manager_Shell.prefab.meta +7 -0
- package/Samples/Voice_Source.prefab +130 -0
- package/Samples/Voice_Source.prefab.meta +7 -0
- package/Samples.meta +8 -0
- package/SelectSFXOnSceneEvent.cs +22 -0
- package/SelectSFXOnSceneEvent.cs.meta +11 -0
- package/SoundManager.cs +191 -0
- package/SoundManager.cs.meta +11 -0
- package/SoundManagerBase.cs +73 -0
- package/SoundManagerBase.cs.meta +11 -0
- package/SoundPlayerDRE.cs +27 -0
- package/SoundPlayerDRE.cs.meta +11 -0
- package/SoundPlayerDREUnity.cs +29 -0
- package/SoundPlayerDREUnity.cs.meta +11 -0
- package/SoundService.cs +11 -0
- package/SoundService.cs.meta +11 -0
- package/StopEnvAudioToTitle.cs +17 -0
- package/StopEnvAudioToTitle.cs.meta +11 -0
- package/VOManagerBase.cs +29 -0
- package/VOManagerBase.cs.meta +11 -0
- package/VoiceSFXManager.cs +105 -0
- package/VoiceSFXManager.cs.meta +11 -0
- package/package.json +36 -6
- package/package.json.meta +7 -0
- package/README.md +0 -3
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
|
|
4
|
+
#if FMOD_UNITY
|
|
5
|
+
using FMODUnity;
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
namespace DREditor.Audio
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[ClassHeader(nameof(VOManagerBase) +
|
|
14
|
+
"\n\n")]
|
|
15
|
+
public class VoiceSFXManager : VOManagerBase
|
|
16
|
+
{
|
|
17
|
+
#if FMOD_UNITY
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
[Tooltip("")]
|
|
22
|
+
[SerializeField] protected StudioEventEmitter voiceSFXSource = null;
|
|
23
|
+
#else
|
|
24
|
+
/// <summary>
|
|
25
|
+
///
|
|
26
|
+
/// </summary>
|
|
27
|
+
[Tooltip("")]
|
|
28
|
+
[SerializeField] protected AudioSource voiceSFXSource = null;
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
/// <inheritdoc/>
|
|
32
|
+
protected override void InitializeService()
|
|
33
|
+
{
|
|
34
|
+
base.InitializeService();
|
|
35
|
+
#if FMOD_UNITY
|
|
36
|
+
if (voiceSFXSource == null)
|
|
37
|
+
voiceSFXSource = GetComponentInChildren<StudioEventEmitter>();
|
|
38
|
+
#else
|
|
39
|
+
if (voiceSFXSource == null)
|
|
40
|
+
voiceSFXSource = GetComponentInChildren<AudioSource>();
|
|
41
|
+
#endif
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// <inheritdoc/>
|
|
45
|
+
public override void PlayVoiceLine<T>(T name)
|
|
46
|
+
{
|
|
47
|
+
#if FMOD_UNITY
|
|
48
|
+
if (name is string eventName && eventName != null && eventName != "")
|
|
49
|
+
PlaySource(voiceSFXSource, eventName);
|
|
50
|
+
#else
|
|
51
|
+
if (name is AudioClip clip && clip != null)
|
|
52
|
+
PlaySource(voiceSFXSource, clip);
|
|
53
|
+
#endif
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#if FMOD_UNITY
|
|
57
|
+
/// <summary>
|
|
58
|
+
///
|
|
59
|
+
/// </summary>
|
|
60
|
+
/// <param name="source"></param>
|
|
61
|
+
/// <param name="eventName"></param>
|
|
62
|
+
protected virtual void PlaySource(StudioEventEmitter source, string eventName)
|
|
63
|
+
{
|
|
64
|
+
if (eventName == "" || source == null)
|
|
65
|
+
return;
|
|
66
|
+
|
|
67
|
+
source.Stop();
|
|
68
|
+
|
|
69
|
+
source.Event = eventName;
|
|
70
|
+
|
|
71
|
+
source.Play();
|
|
72
|
+
}
|
|
73
|
+
#else
|
|
74
|
+
/// <summary>
|
|
75
|
+
///
|
|
76
|
+
/// </summary>
|
|
77
|
+
/// <param name="source"></param>
|
|
78
|
+
/// <param name="clip"></param>
|
|
79
|
+
protected virtual void PlaySource(AudioSource source, AudioClip clip)
|
|
80
|
+
{
|
|
81
|
+
if (clip == null || source == null)
|
|
82
|
+
return;
|
|
83
|
+
|
|
84
|
+
source.Stop();
|
|
85
|
+
|
|
86
|
+
source.clip = clip;
|
|
87
|
+
|
|
88
|
+
source.Play();
|
|
89
|
+
}
|
|
90
|
+
#endif
|
|
91
|
+
|
|
92
|
+
#if FMOD_UNITY
|
|
93
|
+
/// <inheritdoc/>
|
|
94
|
+
public override bool VoicePlaying() => voiceSFXSource != null && voiceSFXSource.IsPlaying();
|
|
95
|
+
#else
|
|
96
|
+
public override bool VoicePlaying() => voiceSFXSource != null && voiceSFXSource.isPlaying;
|
|
97
|
+
#endif
|
|
98
|
+
/// <inheritdoc/>
|
|
99
|
+
public override void StopVoiceLine()
|
|
100
|
+
{
|
|
101
|
+
if (voiceSFXSource != null)
|
|
102
|
+
voiceSFXSource.Stop();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "net.dreditor.audio",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "net.dreditor.audio",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"displayName": "DREditor Audio",
|
|
5
|
+
"description": "The beta for DREditor. A tool to create death game style projects without having to code.",
|
|
6
|
+
"unity": "6000.4",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"net.dreditor.core": "0.1.6",
|
|
9
|
+
"com.unity.ugui": "2.0.0",
|
|
10
|
+
"net.dreditor.eventobjectservices": "0.1.6"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Benjamin \"Sweden\" Jillson",
|
|
17
|
+
"email": "dreditortool@gmail.com",
|
|
18
|
+
"url": "https://dreditor.net"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"editor",
|
|
22
|
+
"tool",
|
|
23
|
+
"dreditor"
|
|
24
|
+
],
|
|
25
|
+
"samples": [
|
|
26
|
+
{
|
|
27
|
+
"displayName": "Samples",
|
|
28
|
+
"description": "",
|
|
29
|
+
"path": "Samples~"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"documentationUrl": "https://dreditor.net",
|
|
33
|
+
"license": "Apache-2.0",
|
|
34
|
+
"licensesUrl": "https://dreditor.net/docs/LICENSE.html",
|
|
35
|
+
"changelogUrl": "https://dreditor.net/docs/CHANGELOG.html"
|
|
36
|
+
}
|
package/README.md
DELETED