54 public class AudioEvent : IComparable, IComparable<AudioEvent>
56 [Tooltip(
"The name of this AudioEvent.")]
57 public string Name =
"_NewAudioEvent";
59 [Tooltip(
"How this sound is to be positioned.")]
62 [Tooltip(
"The size of the Microsoft Spatial Sound room. Only used when positioning is set to SpatialSound.")]
65 [Tooltip(
"The volume attenuation curve for simple 3D sounds. Used when positioning is set to 3D or Spatial")]
66 public AnimationCurve AttenuationCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f);
68 [Tooltip(
"The spatial attenuation curve for simple 3D sounds. Only used when positioning is set to 3D")]
69 public AnimationCurve SpatialCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 1f);
71 [Tooltip(
"The spread attenuation curve for simple 3D sounds. Only used when positioning is set to 3D")]
72 public AnimationCurve SpreadCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0f);
74 [Tooltip(
"The reverb attenuation curve for simple 3D sounds. Only used when positioning is set to 3D")]
75 public AnimationCurve ReverbCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 0f);
77 [Tooltip(
"The maximum attenuation distance for simple 3D sounds. Only used when positioning is set to 3D")]
79 public float MaxDistanceAttenuation3D = 100f;
81 [Tooltip(
"The AudioMixerGroup to use when playing.")]
84 [Tooltip(
"The default or center pitch around which randomization can be done.")]
86 public float PitchCenter = 1.0f;
95 [Tooltip(
"The default or center volume level around which randomization can be done.")]
97 public float VolumeCenter = 1.0f;
106 [Tooltip(
"The default or center panning. Only used when positioning is set to 2D.")]
118 [Tooltip(
"Time, in seconds, for the audio to fade from 0 to the selected volume. Does not apply to continuous containers in which the Crossfade time property is used.")]
122 [Tooltip(
"Time, in seconds, for the audio to fade out from the selected volume to 0. Does not apply to continuous containers in which the Crossfade time property is used.")]
126 [Tooltip(
"The maximum number of instances that should be allowed at a time for this event. Any new instances will be suppressed.")]
129 [Tooltip(
"The amount of time in seconds that an event will remain active past when the sound ends. Useful for limiting the instances of an event beyond the clip play time.")]
132 [Tooltip(
"The behavior when the instance limit is reached.")]
159 if (obj == null) {
return 1; }
163 if (tempEvent != null)
165 return CompareTo(tempEvent);
168 throw new ArgumentException(
"Object is not an AudioEvent");
179 return other == null ? 1 :
string.CompareOrdinal(Name, other.
Name);