net.dreditor.audio 0.1.6 → 0.1.7
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/.attestation.p7m +0 -0
- package/ClearAudioSourceOnTitleScreen.cs +50 -50
- package/ClearAudioSourceOnTitleScreen.cs.meta +11 -11
- package/CreditsMusic.cs +63 -63
- package/CreditsMusic.cs.meta +11 -11
- package/CreditsMusicUnity.cs +21 -21
- package/CreditsMusicUnity.cs.meta +11 -11
- package/DREditor.Audio.asmdef +18 -18
- package/DREditor.Audio.asmdef.meta +7 -7
- package/EnvironmentSFXMananger.cs +159 -159
- package/EnvironmentSFXMananger.cs.meta +11 -11
- package/EnvironmentSFXManangerBase.cs +23 -23
- package/EnvironmentSFXManangerBase.cs.meta +11 -11
- package/Music.cs +26 -26
- package/Music.cs.meta +11 -11
- package/MusicFMOD.cs +31 -31
- package/MusicFMOD.cs.meta +11 -11
- package/MusicManager.cs +435 -435
- package/MusicManager.cs.meta +11 -11
- package/MusicManagerBase.cs +114 -114
- package/MusicManagerBase.cs.meta +11 -11
- package/MusicSaver.cs +126 -126
- package/MusicSaver.cs.meta +11 -11
- package/MusicTextHandler.cs +118 -118
- package/MusicTextHandler.cs.meta +11 -11
- package/OnVoiceLineSettingChanged.cs +68 -68
- package/OnVoiceLineSettingChanged.cs.meta +11 -11
- package/OptionVolume.cs +75 -75
- package/OptionVolume.cs.meta +11 -11
- package/PlaySelectAudioOnUIChange.cs +41 -41
- package/PlaySelectAudioOnUIChange.cs.meta +11 -11
- package/PlaySubmitSFXOnClick.cs +22 -22
- package/PlaySubmitSFXOnClick.cs.meta +11 -11
- package/Playlist.cs +80 -80
- package/Playlist.cs.meta +11 -11
- package/PlaylistEditor.cs +357 -357
- package/PlaylistEditor.cs.meta +11 -11
- package/PlaylistFMOD.cs +38 -38
- package/PlaylistFMOD.cs.meta +11 -11
- package/SFXManager.cs +347 -347
- package/SFXManager.cs.meta +11 -11
- package/SFXManagerBase.cs +37 -37
- package/SFXManagerBase.cs.meta +11 -11
- package/{Samples → Samples~}/Audio_Event_Save_Handler.prefab +57 -57
- package/{Samples → Samples~}/Audio_Event_Save_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Credits_Music_Unity.prefab +66 -66
- package/{Samples → Samples~}/Credits_Music_Unity.prefab.meta +7 -7
- package/{Samples → Samples~}/Dialogue_Click_Sound_Player_DRE.prefab +76 -76
- package/{Samples → Samples~}/Dialogue_Click_Sound_Player_DRE.prefab.meta +7 -7
- package/{Samples → Samples~}/Environment_SFX_Manager.prefab +146 -146
- package/{Samples → Samples~}/Environment_SFX_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Environment_SFX_Manager_Shell.prefab +96 -96
- package/{Samples → Samples~}/Environment_SFX_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Environment_Source.prefab +130 -130
- package/{Samples → Samples~}/Environment_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/Music_Manager.prefab +146 -146
- package/{Samples → Samples~}/Music_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Music_Manager_Shell.prefab +75 -75
- package/{Samples → Samples~}/Music_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Music_Source.prefab +144 -144
- package/{Samples → Samples~}/Music_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/On_Voice_Line_Setting_Changed.prefab +53 -53
- package/{Samples → Samples~}/On_Voice_Line_Setting_Changed.prefab.meta +7 -7
- package/{Samples → Samples~}/Play_Select_Audio_On_UI_Change.prefab +46 -46
- package/{Samples → Samples~}/Play_Select_Audio_On_UI_Change.prefab.meta +7 -7
- package/{Samples → Samples~}/SFX_Manager.prefab +397 -397
- package/{Samples → Samples~}/SFX_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/SFX_Manager_Shell.prefab +53 -53
- package/{Samples → Samples~}/SFX_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/SFX_Source.prefab +130 -130
- package/{Samples → Samples~}/SFX_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/Select_SFX_On_Setting_Changed.prefab +51 -51
- package/{Samples → Samples~}/Select_SFX_On_Setting_Changed.prefab.meta +7 -7
- package/{Samples → Samples~}/Sound_Manager.prefab +473 -473
- package/{Samples → Samples~}/Sound_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Sound_Manager_Events.prefab +261 -261
- package/{Samples → Samples~}/Sound_Manager_Events.prefab.meta +7 -7
- package/{Samples → Samples~}/Sound_Manager_Shell.prefab +370 -370
- package/{Samples → Samples~}/Sound_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Sound_Player_DRE.prefab +47 -47
- package/{Samples → Samples~}/Sound_Player_DRE.prefab.meta +7 -7
- package/{Samples → Samples~}/StopAllAudio.asset +14 -14
- package/{Samples → Samples~}/StopAllAudio.asset.meta +8 -8
- package/{Samples → Samples~}/UI_Cancel_Source.prefab +130 -130
- package/{Samples → Samples~}/UI_Cancel_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Select_Source.prefab +130 -130
- package/{Samples → Samples~}/UI_Select_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/UI_Submit_Source.prefab +130 -130
- package/{Samples → Samples~}/UI_Submit_Source.prefab.meta +7 -7
- package/{Samples → Samples~}/Voice_SFX_Manager.prefab +146 -146
- package/{Samples → Samples~}/Voice_SFX_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Voice_SFX_Manager_Shell.prefab +49 -49
- package/{Samples → Samples~}/Voice_SFX_Manager_Shell.prefab.meta +7 -7
- package/{Samples → Samples~}/Voice_Source.prefab +130 -130
- package/{Samples → Samples~}/Voice_Source.prefab.meta +7 -7
- package/SelectSFXOnSceneEvent.cs +21 -21
- package/SelectSFXOnSceneEvent.cs.meta +11 -11
- package/SoundManager.cs +190 -190
- package/SoundManager.cs.meta +11 -11
- package/SoundManagerBase.cs +72 -72
- package/SoundManagerBase.cs.meta +11 -11
- package/SoundPlayerDRE.cs +26 -26
- package/SoundPlayerDRE.cs.meta +11 -11
- package/SoundPlayerDREUnity.cs +28 -28
- package/SoundPlayerDREUnity.cs.meta +11 -11
- package/SoundService.cs +10 -10
- package/SoundService.cs.meta +11 -11
- package/StopEnvAudioToTitle.cs +16 -16
- package/StopEnvAudioToTitle.cs.meta +11 -11
- package/VOManagerBase.cs +28 -28
- package/VOManagerBase.cs.meta +11 -11
- package/VoiceSFXManager.cs +104 -104
- package/VoiceSFXManager.cs.meta +11 -11
- package/package.json +41 -36
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/SoundPlayerDREUnity.cs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Services;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Audio
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[ClassHeader(nameof(SoundPlayerDRE) +
|
|
11
|
-
"\n\n")]
|
|
12
|
-
public class SoundPlayerDREUnity : SoundPlayerDRE
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
[Tooltip("")]
|
|
18
|
-
[SerializeField] protected AudioClip clipSFX;
|
|
19
|
-
|
|
20
|
-
/// <inheritdoc/>
|
|
21
|
-
public override void PlayMusic() => ServiceLocator.GetService<MusicManagerBase>().PlayMusic(clipSFX);
|
|
22
|
-
|
|
23
|
-
/// <inheritdoc/>
|
|
24
|
-
public override void PlaySFX() => ServiceLocator.GetService<SFXManagerBase>().PlaySFX(clipSFX);
|
|
25
|
-
|
|
26
|
-
/// <inheritdoc/>
|
|
27
|
-
public override void PlayVoiceLine() => ServiceLocator.GetService<VOManagerBase>().PlayVoiceLine(clipSFX);
|
|
28
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Services;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Audio
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ClassHeader(nameof(SoundPlayerDRE) +
|
|
11
|
+
"\n\n")]
|
|
12
|
+
public class SoundPlayerDREUnity : SoundPlayerDRE
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
[Tooltip("")]
|
|
18
|
+
[SerializeField] protected AudioClip clipSFX;
|
|
19
|
+
|
|
20
|
+
/// <inheritdoc/>
|
|
21
|
+
public override void PlayMusic() => ServiceLocator.GetService<MusicManagerBase>().PlayMusic(clipSFX);
|
|
22
|
+
|
|
23
|
+
/// <inheritdoc/>
|
|
24
|
+
public override void PlaySFX() => ServiceLocator.GetService<SFXManagerBase>().PlaySFX(clipSFX);
|
|
25
|
+
|
|
26
|
+
/// <inheritdoc/>
|
|
27
|
+
public override void PlayVoiceLine() => ServiceLocator.GetService<VOManagerBase>().PlayVoiceLine(clipSFX);
|
|
28
|
+
}
|
|
29
29
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b343b0b251bae174bb01674466c074d5
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: b343b0b251bae174bb01674466c074d5
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/SoundService.cs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Services;
|
|
3
|
-
|
|
4
|
-
namespace DREditor.Audio
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
///
|
|
8
|
-
/// </summary>
|
|
9
|
-
/// <typeparam name="T"></typeparam>
|
|
10
|
-
public class SoundService<T> : ServiceHolder<T> where T : class { }
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Services;
|
|
3
|
+
|
|
4
|
+
namespace DREditor.Audio
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
///
|
|
8
|
+
/// </summary>
|
|
9
|
+
/// <typeparam name="T"></typeparam>
|
|
10
|
+
public class SoundService<T> : ServiceHolder<T> where T : class { }
|
|
11
11
|
}
|
package/SoundService.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 7876c47c60879084e8a5eb7f37934204
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 7876c47c60879084e8a5eb7f37934204
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/StopEnvAudioToTitle.cs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Services;
|
|
3
|
-
using UnityEngine;
|
|
4
|
-
|
|
5
|
-
namespace DREditor.Audio
|
|
6
|
-
{
|
|
7
|
-
/// <summary>
|
|
8
|
-
///
|
|
9
|
-
/// </summary>
|
|
10
|
-
[ClassHeader(nameof(IToTitleScreen) +
|
|
11
|
-
"\n\n")]
|
|
12
|
-
public class StopEnvAudioToTitle : MonoBehaviour, IToTitleScreen
|
|
13
|
-
{
|
|
14
|
-
/// <inheritdoc/>
|
|
15
|
-
public virtual void ToTitleScreen() => ServiceLocator.GetService<EnvironmentSFXManangerBase>().StopEnv();
|
|
16
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Services;
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
|
|
5
|
+
namespace DREditor.Audio
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
///
|
|
9
|
+
/// </summary>
|
|
10
|
+
[ClassHeader(nameof(IToTitleScreen) +
|
|
11
|
+
"\n\n")]
|
|
12
|
+
public class StopEnvAudioToTitle : MonoBehaviour, IToTitleScreen
|
|
13
|
+
{
|
|
14
|
+
/// <inheritdoc/>
|
|
15
|
+
public virtual void ToTitleScreen() => ServiceLocator.GetService<EnvironmentSFXManangerBase>().StopEnv();
|
|
16
|
+
}
|
|
17
17
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: fd796442101d108449137486ed6e4e34
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: fd796442101d108449137486ed6e4e34
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/VOManagerBase.cs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
|
|
3
|
-
namespace DREditor.Audio
|
|
4
|
-
{
|
|
5
|
-
/// <summary>
|
|
6
|
-
///
|
|
7
|
-
/// </summary>
|
|
8
|
-
/// <remarks></remarks>
|
|
9
|
-
public abstract class VOManagerBase : SoundService<VOManagerBase>
|
|
10
|
-
{
|
|
11
|
-
/// <summary>
|
|
12
|
-
///
|
|
13
|
-
/// </summary>
|
|
14
|
-
/// <typeparam name="T"></typeparam>
|
|
15
|
-
/// <param name="eventName"></param>
|
|
16
|
-
public abstract void PlayVoiceLine<T>(T eventName);
|
|
17
|
-
|
|
18
|
-
/// <summary>
|
|
19
|
-
///
|
|
20
|
-
/// </summary>
|
|
21
|
-
public abstract void StopVoiceLine();
|
|
22
|
-
|
|
23
|
-
/// <summary>
|
|
24
|
-
///
|
|
25
|
-
/// </summary>
|
|
26
|
-
/// <returns></returns>
|
|
27
|
-
public abstract bool VoicePlaying();
|
|
28
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
|
|
3
|
+
namespace DREditor.Audio
|
|
4
|
+
{
|
|
5
|
+
/// <summary>
|
|
6
|
+
///
|
|
7
|
+
/// </summary>
|
|
8
|
+
/// <remarks></remarks>
|
|
9
|
+
public abstract class VOManagerBase : SoundService<VOManagerBase>
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
///
|
|
13
|
+
/// </summary>
|
|
14
|
+
/// <typeparam name="T"></typeparam>
|
|
15
|
+
/// <param name="eventName"></param>
|
|
16
|
+
public abstract void PlayVoiceLine<T>(T eventName);
|
|
17
|
+
|
|
18
|
+
/// <summary>
|
|
19
|
+
///
|
|
20
|
+
/// </summary>
|
|
21
|
+
public abstract void StopVoiceLine();
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
///
|
|
25
|
+
/// </summary>
|
|
26
|
+
/// <returns></returns>
|
|
27
|
+
public abstract bool VoicePlaying();
|
|
28
|
+
}
|
|
29
29
|
}
|
package/VOManagerBase.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 02afc33cec5d2e345a75015c97ebad3d
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 02afc33cec5d2e345a75015c97ebad3d
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/VoiceSFXManager.cs
CHANGED
|
@@ -1,105 +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
|
-
}
|
|
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
105
|
}
|
package/VoiceSFXManager.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: b46263e4b80e0e44f983a706ba9f7ef8
|
|
3
|
-
MonoImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
serializedVersion: 2
|
|
6
|
-
defaultReferences: []
|
|
7
|
-
executionOrder: 0
|
|
8
|
-
icon: {instanceID: 0}
|
|
9
|
-
userData:
|
|
10
|
-
assetBundleName:
|
|
11
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: b46263e4b80e0e44f983a706ba9f7ef8
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/package.json
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "net.dreditor.audio",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
9
|
-
"com.unity.ugui": "2.0.0",
|
|
10
|
-
"net.dreditor.eventobjectservices": "0.1.
|
|
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
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "net.dreditor.audio",
|
|
3
|
+
"version": "0.1.7",
|
|
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.7",
|
|
9
|
+
"com.unity.ugui": "2.0.0",
|
|
10
|
+
"net.dreditor.eventobjectservices": "0.1.7"
|
|
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
|
+
"repository": {
|
|
37
|
+
"url": "https://github.com/CertifiedSharp/DREditor",
|
|
38
|
+
"type": "git",
|
|
39
|
+
"revision": "14ca252fbb33eb6f53557ecaed1c10902877698f"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/package.json.meta
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: e9197c21e01a53142862e143a10698a0
|
|
3
|
-
TextScriptImporter:
|
|
4
|
-
externalObjects: {}
|
|
5
|
-
userData:
|
|
6
|
-
assetBundleName:
|
|
7
|
-
assetBundleVariant:
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: e9197c21e01a53142862e143a10698a0
|
|
3
|
+
TextScriptImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
userData:
|
|
6
|
+
assetBundleName:
|
|
7
|
+
assetBundleVariant:
|