diff --git a/CommunityEntity.Sound.cs b/CommunityEntity.Sound.cs new file mode 100644 index 0000000..b03fba5 --- /dev/null +++ b/CommunityEntity.Sound.cs @@ -0,0 +1,365 @@ +using ConVar; +using JSON; +using Object = JSON.Object; +using UnityEngine; +using UnityEngine.Audio; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Facepunch.Extend; +using System.IO; + +#if CLIENT + +public partial class CommunityEntity +{ + private static List AllSounds = new List(); + private static Dictionary ServerDefinitions = new Dictionary(); + + + private static Dictionary SoundDict = new Dictionary(); + private static Dictionary WebSoundCache = new Dictionary(); + + public static void DestroyServerCreatedSounds() + { + foreach ( var sound in AllSounds ) + { + SoundManager.RecycleSound(sound); + } + + foreach(var def in ServerDefinitions){ + UnityEngine.Object.Destroy(def.Value); + } + + AllSounds.Clear(); + ServerDefinitions.Clear(); + } + + private static void RegisterDefinition(string name, SoundDefinition def ) + { + if(ServerDefinitions.ContainsKey(name)){ + // unsure if we should kill the old definition, since it may affect currently playing sounds that still use the old definition + // when in doubt, Leave it to the Facepunch Devs :smug: + ServerDefinitions[name] = def; + return; + } + ServerDefinitions.Add(name, def); + } + + private static void RegisterSound(string name, Sound sound ) + { + AllSounds.Add( sound ); + if(SoundDict.ContainsKey(name)){ + // kill old sound since we overwrite the ability to control the old sound source + KillSound( SoundDict[name], 0f ); + SoundDict[name] = sound; + return; + } + SoundDict.Add(name, sound); + + } + + [RPC_Client] + public void AddSoundDefinition( RPCMessage msg ) + { + AddSoundDefinition(msg.read.StringRaw()); + } + public void AddSoundDefinition( string msg ) + { + var str = msg; + + if ( string.IsNullOrEmpty( str ) ) return; + + var jsonArray = JSON.Array.Parse( str ); + + if ( jsonArray == null ) return; + + foreach ( var value in jsonArray ) + { + var json = value.Obj; + // in my test case i used Resources.Load to load a template SoundDefinition, this should be changed to use something from the asset bundle + SoundDefinition def = Instantiate((SoundDefinition)Resources.Load("TestDefinition")); + + string name = json.GetString("name", "ServerCreated_SoundDefinition"); + string url = json.GetString("url", null); + if(string.IsNullOrEmpty(url)) continue; + + def.loop = json.GetBoolean("loop", false); + var cat = ParseEnum(json.GetString("category", "master"), VolumeCategory.master); + def.volume = GetVolumeForCategory(cat); + + Rust.Global.Runner.StartCoroutine( LoadSoundFromWWW(def, url) ); + + if(json.ContainsKey("falloffCurve")){ + def.falloffCurve = CreateCurveFromArray(json.GetArray("falloffCurve")); + def.useCustomFalloffCurve = true; + } + + if(json.ContainsKey("spatialBlendCurve")){ + def.spatialBlendCurve = CreateCurveFromArray(json.GetArray("spatialBlendCurve")); + def.useCustomSpatialBlendCurve = true; + } + + if(json.ContainsKey("spreadCurve")){ + def.spreadCurve = CreateCurveFromArray(json.GetArray("spreadCurve")); + def.useCustomSpreadCurve = true; + } + def.volumeVariation = json.GetFloat("volumeDiff", 0f); + def.pitch = json.GetFloat("pitch", 1f); + def.pitchVariation = json.GetFloat("pitchDiff", 0f); + + + RegisterDefinition(name, def); + } + } + public AnimationCurve CreateCurveFromArray(JSON.Array array){ + Keyframe[] keyframes = new Keyframe[array.Length]; + int i = 0; + foreach(var value in array){ + Color val = ColorEx.Parse(value.Str); + keyframes[i++] = new Keyframe(val.r, val.g, val.b, val.a); + } + return new AnimationCurve(keyframes); + } + + [RPC_Client] + public void PlaySound( RPCMessage msg ) + { + PlaySound(msg.read.StringRaw()); + } + public void PlaySound( string msg ) + { + + var str = msg; + + if ( string.IsNullOrEmpty( str ) ) return; + + var jsonArray = JSON.Array.Parse( str ); + + if ( jsonArray == null ) return; + + foreach ( var value in jsonArray ) + { + Sound sound; + var json = value.Obj; + + string instanceName = json.GetString("instanceName", "ServerCreated_SoundInstance"); + float fadeIn = json.GetFloat("fadeIn", 0f); + + + sound = FindSound(instanceName); + if(sound != null){ + sound.Stop(); + if(fadeIn > 0f){ + sound.FadeInAndPlay(fadeIn); + }else{ + sound.Play(); + } + continue; + } + + + string definition = json.GetString("definition", null); + uint parentID = (uint)json.GetNumber("parent", 0); + Vector3 position = Vector3Ex.Parse(json.GetString("offset", "0 0 0")); + if(string.IsNullOrEmpty(definition)) continue; + + SoundDefinition def = FindDefinition(definition); + if(def == null) continue; + BaseEntity parent = null; + if(parentID != 0) + parent = (BaseNetworkable.clientEntities.Find(parentID) as BaseEntity); + bool firstPerson = (parent == null && position == Vector3.zero); + sound = SoundManager.RequestSoundInstance(def, parent?.gameObject, position, firstPerson); + if(!sound) continue; + + // Experiencing a bug here i'm unsure if its only occuring on my test scenario, it seems like the max distance of the source gets set to 500 every frame + // ideally i would like to have this & dopplerScale be a setting when defining the sound definition instead, but i couldnt find a way to make that happen with the way new Sounds get instantiated + float maxDistance = json.GetFloat("maxDistance", 1f); + if(maxDistance > 0f){ + sound.audioSources[0].maxDistance = maxDistance; + } + sound.audioSources[0].dopplerLevel = json.GetFloat("dopplerScale", 1f); + RegisterSound(instanceName, sound); + if(fadeIn > 0f){ + sound.FadeInAndPlay(fadeIn); + }else{ + sound.Play(); + } + } + } + + [RPC_Client] + public void StopSound( RPCMessage msg ) + { + StopSound(msg.read.StringRaw()); + } + public void StopSound( string msg ) + { + var str = msg; + + if ( string.IsNullOrEmpty( str ) ) return; + + var jsonArray = JSON.Array.Parse( str ); + + if ( jsonArray == null ) return; + + foreach ( var value in jsonArray ) + { + var json = value.Obj; + + string instanceName = json.GetString("instanceName", "ServerCreated_SoundInstance"); + float fadeOut = json.GetFloat("fadeOut", 0f); + bool kill = json.GetBoolean("kill", false); + Sound sound = FindSound(instanceName); + if(!sound) continue; + // we dont recycle the sound so it can be played again in future RPC calls + if(fadeOut > 0f){ + sound.fade.FadeOut(fadeOut); + if(kill) Invoke(new Action(() => KillSound(sound)), fadeOut); + else Invoke(new Action(sound.Stop), fadeOut); + }else{ + sound.Stop(); + } + + } + } + + private SoundDefinition FindDefinition( string name ) + { + + SoundDefinition def; + if ( ServerDefinitions.TryGetValue( name, out def ) ) + { + return def; + } + if(name.StartsWith("assets")){ + def = FileSystem.Load(name); + if(def == null){ + return null; + }else{ + RegisterDefinition(name, def); + return def; + } + } + + return null; + } + + private Sound FindSound( string name ) + { + + Sound sound; + if ( SoundDict.TryGetValue( name, out sound ) ) + { + return sound; + } + + return null; + } + private IEnumerator LoadSoundFromWWW( SoundDefinition def, string source) + { + if(WebSoundCache.ContainsKey(source)){ + // todo: assign audio + if(def != null) + def.weightedAudioClips.Add(new WeightedAudioClip{ + audioClip = WebSoundCache[source] + }); + yield break; + } + + var www = new WWW( source.Trim() ); + + while ( !www.isDone ) + { + yield return null; + } + + if ( !string.IsNullOrEmpty( www.error ) ) + { + Debug.Log( "Error downloading sound: " + source + " (" + www.error + ")" ); + www.Dispose(); + yield break; + } + + + AudioClip clip = www.GetAudioClip(); + if ( clip == null ) + { + Debug.Log( "Error downloading sound: " + source + " (not a sound file)" ); + www.Dispose(); + yield break; + } + + if(def != null) def.weightedAudioClips.Add(new WeightedAudioClip{ + audioClip = clip + }); + + if(!WebSoundCache.ContainsKey(source)) WebSoundCache.Add(source, clip); + + www.Dispose(); + } + + + public void DestroySound( RPCMessage msg ) + { + DestroySound( msg.read.StringRaw() ); + } + public static void DestroySound( string str ) + { + + Sound sound; + + if ( string.IsNullOrEmpty( str ) ) return; + + var jsonArray = JSON.Array.Parse( str ); + if ( jsonArray == null ) return; + + foreach ( var value in jsonArray ){ + var json = value.Obj; + if (SoundDict.TryGetValue( json.GetString("instance", "Invalid_Instance"), out sound )) continue; + + KillSound( sound, json.GetFloat("fadeOut", 0f)); + } + + } + + public float GetVolumeForCategory(VolumeCategory category){ + switch(category){ + case VolumeCategory.master: return Audio.master; + case VolumeCategory.music: return Audio.musicvolume; + case VolumeCategory.game: return Audio.game; + case VolumeCategory.voice: return Audio.voices; + case VolumeCategory.instruments: return Audio.instruments; + case VolumeCategory.voiceProps: return Audio.voiceProps; + default: return Audio.master; + } + return Audio.master; + } + + public enum VolumeCategory{ + master, + music, + game, + voice, + instruments, + voiceProps + } + + private static void KillSound( Sound sound, float fadeOut = 0f ) + { + if(AllSounds.Contains(sound)) AllSounds.Remove(sound); + + if ( fadeOut > 0f) + { + sound.FadeOutAndRecycle(fadeOut); + } + else + { + SoundManager.RecycleSound(sound); + } + } +} + +#endif diff --git a/CommunityEntity.UI.SoundTrigger.cs b/CommunityEntity.UI.SoundTrigger.cs new file mode 100644 index 0000000..e5d26d3 --- /dev/null +++ b/CommunityEntity.UI.SoundTrigger.cs @@ -0,0 +1,101 @@ + +using Object = UnityEngine.Object; +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + + +#if CLIENT + + +public partial class CommunityEntity +{ + + public class SoundTrigger : MonoBehaviour, IMouseReceiver { + + public List OnHoverEvents = new List(); + public List OnClickEvents = new List(); + + public List ActiveSounds = new List(); + + private string _mouseTarget = ""; + + public string mouseTarget{ + get => _mouseTarget; + set => _mouseTarget = value; + } + + public bool isHovered = false; + private float lastUnhovered = 0f; + + public void OnHoverEnter(){ + if(isHovered || lastUnhovered + 0.1f > Time.time) return; + isHovered = true; + foreach(var ev in OnHoverEvents){ + PlayEvent(ev); + } + } + public void OnClick(){ + foreach(var ev in OnClickEvents){ + PlayEvent(ev); + } + } + public void OnHoverExit(){ + foreach(var ev in ActiveSounds){ + if(ev == null || ev.ActiveSound == null || !ev.killOnExit) continue; + if(ev.fadeOut > 0f){ + ev.ActiveSound.FadeOutAndRecycle(ev.fadeOut); + }else{ + SoundManager.RecycleSound(ev.ActiveSound); + } + } + ActiveSounds.Clear(); + isHovered = false; + lastUnhovered = Time.time; + } + + public void PlayEvent(SoundEvent ev){ + if(ev == null || ev.definitionToPlay == null) return; + if(ev.killOnExit){ + ev.ActiveSound = PlayActive(ev); + ActiveSounds.Add(ev); + }else{ + PlayOneshot(ev); + } + } + + public void PlayOneshot(SoundEvent ev){ + SoundDefinition def = NuCommunityEntity.ClientInstance.FindDefinition(ev.definitionToPlay); + if(def == null) return; + SoundManager.PlayOneshot(def, null, true, Vector3.zero); + } + public Sound PlayActive(SoundEvent ev){ + SoundDefinition def = NuCommunityEntity.ClientInstance.FindDefinition(ev.definitionToPlay); + if(def == null) return null; + + Sound sound = SoundManager.RequestSoundInstance(def, null, Vector3.zero, true); + if(!sound) return null; + + if(ev.fadeIn > 0f){ + sound.FadeInAndPlay(ev.fadeIn); + }else{ + sound.Play(); + } + if(!def.loop) sound.RecycleAfterPlaying(); + return sound; + } + + public class SoundEvent { + public string definitionToPlay = ""; + public float fadeIn = 0f; + public bool killOnExit = true; + public float fadeOut = 0f; + + public Sound ActiveSound; + } + } + +} + +#endif diff --git a/CommunityEntity.UI.cs b/CommunityEntity.UI.cs index f8209a6..8facddf 100644 --- a/CommunityEntity.UI.cs +++ b/CommunityEntity.UI.cs @@ -327,6 +327,35 @@ private void CreateComponents( GameObject go, JSON.Object obj ) go.AddComponent(); break; } + case "SoundTrigger": + { + + SoundTrigger trig = go.GetComponent(); + if(!trig) trig = go.AddComponent(); + ScheduleMouseListener(go.name, trig); + + foreach(var prop in obj.GetArray("sounds")) + { + var propobj = prop.Obj; + if(!propobj.ContainsKey("trigger") || !propobj.ContainsKey("definitionToPlay")) continue; + + var condition = propobj.GetString("trigger", "Hover"); + + SoundTrigger.SoundEvent ev = new SoundTrigger.SoundEvent{ + definitionToPlay = propobj.GetString("definitionToPlay", ""), + fadeIn = propobj.GetFloat("fadeIn", 0f), + killOnExit = propobj.GetBoolean("killOnExit", true), + fadeOut = propobj.GetFloat("fadeOut", 0f) + }; + + if(condition == "Click"){ + trig.OnClickEvents.Add(ev); + }else{ + trig.OnHoverEvents.Add(ev); + } + } + break; + } } } diff --git a/EditorTools/AudioEditor.cs b/EditorTools/AudioEditor.cs new file mode 100644 index 0000000..9e1d560 --- /dev/null +++ b/EditorTools/AudioEditor.cs @@ -0,0 +1,147 @@ +using System.Collections; +using System.Text; +using System.Collections.Generic; +using UnityEngine; + +public class AudioEditor : MonoBehaviour +{ + + [Header("Load SoundDefinition")] + + [Tooltip("Required, the name of the SoundDefinition")] + public string definitionName = ""; + + [Tooltip("Required, the url of the sound file")] + public string soundUrl = ""; + + [Tooltip("Optional, the Volume Setting the sound should use, defaults to Master")] + public VolumeCategory audioCategory = VolumeCategory.master; + + [Tooltip("Whether or not the sound should loop")] + public bool shouldLoop = false; + + [Tooltip("Optional, sets range for volume variation")] + [Range(0f, 1f)] + public float volumeDiff = 0f; + + [Tooltip("Optional, sets pitch offset")] + [Range(-3f, 3f)] + public float pitch = 1f; + + [Tooltip("Optional, sets range for random pitch")] + [Range(0f, 1f)] + public float pitchDiff = 0f; + + [Tooltip("Optional, Serializes the Animation's keyframes into a list of strings to reconstruct later")] + public AnimationCurve falloffCurve = new AnimationCurve(); + + [Tooltip("Optional, Serializes the Animation's keyframes into a list of strings to reconstruct later")] + public AnimationCurve spatialBlendCurve = new AnimationCurve(); + + [Tooltip("Optional, Serializes the Animation's keyframes into a list of strings to reconstruct later")] + public AnimationCurve spreadCurve = new AnimationCurve(); + + [CustomButtonAttribute("ApplyDefinition")] + public bool ApplyingDefinition; + + [Space(10)] + [Header("Load Sound")] + + [Tooltip("Required, the name of the sound instance, allows you to kill it later")] + public string instanceName = ""; + + [Tooltip("Required, the path/name of the definition to use")] + public string definition = ""; + + [Tooltip("Optional, if higher than 0 the sound will linearly fade in instead of playing at full volume immediately")] + public float fadeIn = 0f; + + [Tooltip("Optional, attempts to find an Entity to parent the sound to")] + public uint parentNetID = 0; + + [Tooltip("Optional, Positions the sound in the world instead of it being first person")] + public Vector3 offset; + + [Tooltip("Optional, Sets a Custom Max Distance")] + [Range(0f, 500f)] + public float maxDistance = 0f; + + [Tooltip("Optional, sets a custom doppler value to modify how relative velocity affects the pitch of the sound")] + [Range(0f, 1f)] + public float dopplerScale = 0f; + + [CustomButtonAttribute("ApplySound")] + public bool ApplyingSound; + + + [Space(10)] + [Header("Stop Sound")] + + + [Tooltip("Required, finds the active sound instance to kill")] + public string instanceToKill = ""; + + [Tooltip("Optional, fades out the sound before killing it")] + public float fadeOut = 0f; + + [Tooltip("Whether or not to Kill the Sound")] + public bool killSound = false; + + [CustomButtonAttribute("StopSound")] + public bool ApplyingEndSound; + + public void ApplyDefinition(){ + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append("[{\"name\": \"" + definitionName + "\", \"url\": \"" + soundUrl + "\", \"loop\": " + (shouldLoop ? "true" : "false") + ", \"category\": \"" + audioCategory + "\", \"volumeDiff\": " + volumeDiff + ", \"pitch\": " + pitch + ", \"pitchDiff\": " + pitchDiff + ""); + + if (falloffCurve.length > 0){ + stringBuilder.Append(", \"falloffCurve\": ["); + foreach(var frame in falloffCurve.keys){ + stringBuilder.Append($"\"{frame.time} {frame.@value} {frame.inTangent} {frame.outTangent}\", "); + } + stringBuilder.Remove(stringBuilder.Length - 2, 2); + stringBuilder.Append("]"); + } + + if (spatialBlendCurve.length > 0){ + stringBuilder.Append(", \"spatialBlendCurve\": ["); + foreach(var frame in spatialBlendCurve.keys){ + stringBuilder.Append($"\"{frame.time} {frame.@value} {frame.inTangent} {frame.outTangent}\", "); + } + stringBuilder.Remove(stringBuilder.Length - 2, 2); + stringBuilder.Append("]"); + } + + if (spreadCurve.length > 0){ + stringBuilder.Append(", \"spreadCurve\": ["); + foreach(var frame in spreadCurve.keys){ + stringBuilder.Append($"\"{frame.time} {frame.@value} {frame.inTangent} {frame.outTangent}\", "); + } + stringBuilder.Remove(stringBuilder.Length - 2, 2); + stringBuilder.Append("]"); + } + + stringBuilder.Append("}]"); + CommunityEntity.ClientInstance?.AddSoundDefinition( stringBuilder.ToString()); + } + + public void ApplySound(){ + string LoadSound = "[{\"instanceName\": \"" + instanceName + "\", \"definition\": \"" + definition + "\", \"fadeIn\": " + fadeIn + ", \"parent\": " + parentNetID + ", \"offset\": \"" + $"{offset.x} {offset.y} {offset.z}" + "\", \"maxDistance\": " + maxDistance + ", \"dopplerScale\": " + dopplerScale + "}]"; + CommunityEntity.ClientInstance?.PlaySound( LoadSound ); + } + + public void StopSound(){ + string EndSound = "[{\"instanceName\": \"" + instanceToKill + "\", \"fadeOut\": " + fadeOut + ", \"kill\": " + (killSound ? "true" : "false") + ",}]"; + CommunityEntity.ClientInstance?.StopSound( EndSound ); + + } + + public enum VolumeCategory{ + master, + music, + game, + voice, + instruments, + voiceProps + } +} diff --git a/EditorTools/BasicFirstPersonSound.preset b/EditorTools/BasicFirstPersonSound.preset new file mode 100644 index 0000000..a843d2a --- /dev/null +++ b/EditorTools/BasicFirstPersonSound.preset @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: BasicFirstPersonSound + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: a2154450a9d85844681499db7c7de83b, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionName + value: BasicFirstPersonSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: soundUrl + value: https://20k.gg/audio/SoundTest/test1.wav + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: audioCategory + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: shouldLoop + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingDefinition + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceName + value: TestInstance1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definition + value: BasicFirstPersonSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionType + value: Custom + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeIn + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: parentNetID + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceToKill + value: TestInstance1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeOut + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: killSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingEndSound + value: 0 + objectReference: {fileID: 0} diff --git a/EditorTools/CustomButtonAttribute.cs b/EditorTools/CustomButtonAttribute.cs new file mode 100644 index 0000000..059e8f2 --- /dev/null +++ b/EditorTools/CustomButtonAttribute.cs @@ -0,0 +1,42 @@ +using UnityEngine; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +#if UNITY_EDITOR +[CustomPropertyDrawer(typeof(CustomButtonAttribute))] +public class ButtonDrawer : PropertyDrawer +{ + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + string methodName = (attribute as CustomButtonAttribute).MethodName; + Object target = property.serializedObject.targetObject; + System.Type type = target.GetType(); + System.Reflection.MethodInfo method = type.GetMethod(methodName); + if (method == null) + { + GUI.Label(position, "Method could not be found. Is it public?"); + return; + } + if (method.GetParameters().Length > 0) + { + GUI.Label(position, "Method cannot have parameters."); + return; + } + if (GUI.Button(position, method.Name)) + { + method.Invoke(target, null); + } + } +} +#endif + +public class CustomButtonAttribute : PropertyAttribute +{ + public string MethodName { get; } + public CustomButtonAttribute(string methodName) + { + MethodName = methodName; + } +} diff --git a/EditorTools/LoopingFirstPersonSound.preset b/EditorTools/LoopingFirstPersonSound.preset new file mode 100644 index 0000000..47432d1 --- /dev/null +++ b/EditorTools/LoopingFirstPersonSound.preset @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: LoopingFirstPersonSound + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: a2154450a9d85844681499db7c7de83b, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionName + value: LoopingFirstPersonSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: soundUrl + value: https://20k.gg/audio/SoundTest/testLoopable1.wav + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: audioCategory + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: shouldLoop + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingDefinition + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceName + value: TestInstance2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definition + value: LoopingFirstPersonSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionType + value: Custom + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeIn + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: parentNetID + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceToKill + value: TestInstance2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeOut + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: killSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingEndSound + value: 0 + objectReference: {fileID: 0} diff --git a/EditorTools/ParentedLoopingSound.preset b/EditorTools/ParentedLoopingSound.preset new file mode 100644 index 0000000..1670538 --- /dev/null +++ b/EditorTools/ParentedLoopingSound.preset @@ -0,0 +1,359 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ParentedLoopingSound + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: a2154450a9d85844681499db7c7de83b, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionName + value: ParentedLoopingSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: soundUrl + value: https://20k.gg/audio/SoundTest/testLoopable2.wav + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: audioCategory + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: shouldLoop + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: volumeDiff + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: pitch + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: pitchDiff + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].value + value: 1.0047455 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].inSlope + value: -2.5332327 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].outSlope + value: -2.5332327 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].outWeight + value: 0.08390289 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].time + value: 1.0003443 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].value + value: -0.00039142324 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].inSlope + value: -0.23865682 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].outSlope + value: -0.23865682 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].inWeight + value: 0.16143969 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].value + value: 1.0047455 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].inSlope + value: -3.4047182 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].outSlope + value: -3.4047182 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].outWeight + value: 0.06103448 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].time + value: 1.0003443 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].value + value: -0.00039142324 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].inSlope + value: -0.23865682 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].outSlope + value: -0.23865682 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].inWeight + value: 0.16143969 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].value + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].time + value: 1.000072 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].value + value: 0.5000426 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].tangentMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingDefinition + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceName + value: TestInstance4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definition + value: ParentedLoopingSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionType + value: Custom + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeIn + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: parentNetID + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: maxDistance + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: dopplerScale + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceToKill + value: TestInstance4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeOut + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: killSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingEndSound + value: 0 + objectReference: {fileID: 0} diff --git a/EditorTools/SoundLoadedFromFileSystem.preset b/EditorTools/SoundLoadedFromFileSystem.preset new file mode 100644 index 0000000..a0b3493 --- /dev/null +++ b/EditorTools/SoundLoadedFromFileSystem.preset @@ -0,0 +1,355 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SoundLoadedFromFileSystem + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: a2154450a9d85844681499db7c7de83b, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionName + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: soundUrl + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: audioCategory + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: shouldLoop + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: volumeDiff + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: pitch + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: pitchDiff + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[0].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].time + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: falloffCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[0].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].time + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spatialBlendCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].time + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[0].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].time + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].value + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].inSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].outSlope + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].tangentMode + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].weightedMode + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].inWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_Curve.Array.data[1].outWeight + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_PreInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_PostInfinity + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: spreadCurve.m_RotationOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingDefinition + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceName + value: TestInstance5 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definition + value: assets/content/sound/sounddefinitions/entities/helicopter/helicopter-rocket-fire-single.asset + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeIn + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: parentNetID + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: maxDistance + value: 100 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: dopplerScale + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceToKill + value: TestInstance4 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeOut + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: killSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingEndSound + value: 0 + objectReference: {fileID: 0} diff --git a/EditorTools/StaticPositionedSound.preset b/EditorTools/StaticPositionedSound.preset new file mode 100644 index 0000000..fc2ba60 --- /dev/null +++ b/EditorTools/StaticPositionedSound.preset @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!181963792 &2655988077585873504 +Preset: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: StaticPositionedSound + m_TargetType: + m_NativeTypeID: 114 + m_ManagedTypePPtr: {fileID: 11500000, guid: a2154450a9d85844681499db7c7de83b, + type: 3} + m_ManagedTypeFallback: + m_Properties: + - target: {fileID: 0} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorHideFlags + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: m_EditorClassIdentifier + value: + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionName + value: StaticPositionedSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: soundUrl + value: https://20k.gg/audio/SoundTest/test2.wav + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: audioCategory + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: shouldLoop + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingDefinition + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceName + value: TestInstance3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definition + value: StaticPositionedSound + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: definitionType + value: Custom + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeIn + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: parentNetID + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: offset.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: instanceToKill + value: TestInstance3 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: fadeOut + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: killSound + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 0} + propertyPath: ApplyingEndSound + value: 0 + objectReference: {fileID: 0}