Skip to content

Class AudityBatchGroup

Coordinates DarkEffekt.Audity.AuditySource instances that share it, capping how many play at once and detecting trigger bursts. Assign the same group asset to every source that should count against the cap.

Declaration
[CreateAssetMenu(menuName = "Audity/Batch Group", fileName = "New Batch Group", order = 21)]
[Icon("Packages/com.darkeffekt.audity/Editor/Icons/Assets/AudityBatchGroup.png")]
public sealed class AudityBatchGroup : ScriptableObject

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.ScriptableObject

How many members may sound at once, and how many triggers fit in the coalesce window, before overflow kicks in.

Declaration
[Tooltip("How many members may sound at once (and how many triggers fit in the coalesce window) before the overflow behavior kicks in.")]
[Min(1)]
public int maxInstances

Triggers arriving within this many seconds of each other count as one burst; 0 disables burst counting.

Declaration
[Tooltip("Triggers arriving within this many seconds of each other count as one burst. 0 disables burst counting; only the concurrent cap applies.")]
[Min(0)]
public float coalesceWindowSeconds

Only members within this distance of each other count together; 0 makes the group global.

Declaration
[Tooltip("Only members within this distance of each other count together. 0 = the group is global.")]
[Min(0)]
public float radius

What happens to a play request that would exceed the cap.

Declaration
public AudityBatchOverflow overflow

Played once at the members’ centroid when a burst overflows under DarkEffekt.Audity.AudityBatchOverflow.PlayComposite.

Declaration
[Tooltip("Played once at the members' centroid when a burst overflows (Play Composite).")]
[FormerlySerializedAs("compositeAsset")]
public AudityGraph compositeGraph

Optional name of a parameter that receives the coalesced trigger count on the composite instance.

Declaration
[Tooltip("Optional: this parameter receives the number of coalesced triggers on the composite instance (e.g. drive a Parameter In → gain).")]
public string intensityParameterName

After the composite fires, further triggers near it are swallowed for this many seconds.

Declaration
[Tooltip("After the composite fires, further triggers near it are swallowed for this many seconds.")]
[Min(0)]
public float cooldownSeconds

Fade-out applied to members that are stopped by stealing or by the composite swap.

Declaration
[Tooltip("Fade-out applied to members that are stopped by stealing or by the composite swap.")]
[Min(0)]
public float stealFadeSeconds