Class AuditySampleSet
The substitution unit for Wave Player content: the entries plus how one is picked (weights ride on the entries; selection policy and avoid-repeat live here because they are tuned to the specific content). What stays on the Wave Player is voice behavior (voice mode, max voices, pitch, gain): the Set is “what plays and how it’s picked”; the player is “how a shot behaves”.
A Set is a plain serializable value - inline on a Wave Player by default (the drop-one-clip flow has zero extra steps), promoted to a shared DarkEffekt.Audity.AuditySampleSetAsset when several graphs or game configs reuse it. At runtime a resolved Set is prepared into a bank (see DarkEffekt.Audity.AudityBank) keyed by content hash, so identical inline copies and asset references share one resident bank.
Assembly: DarkEffekt.Audity.Runtime
Section titled “Assembly: DarkEffekt.Audity.Runtime”[Serializable]public sealed class AuditySampleSetProperties
Section titled “Properties”HasPlayableEntry
Section titled “HasPlayableEntry”True when at least one entry can produce audio.
public bool HasPlayableEntry { get; }Fields
Section titled “Fields”entries
Section titled “entries”public AuditySampleEntry[] entriesselection
Section titled “selection”public AuditySampleSelect selectionavoidRepeat
Section titled “avoidRepeat”Avoid the last N picks (Random and Shuffle draws; ignored by Round Robin).
[Range(0, 8)]public int avoidRepeatMethods
Section titled “Methods”Clone()
Section titled “Clone()”public AuditySampleSet Clone()Returns
Section titled “Returns”DarkEffekt.Audity.AuditySampleSet
FromObject(Object)
Section titled “FromObject(Object)”The canonical widening rule: any playable source promotes to a single-entry
Set. Accepts an DarkEffekt.Audity.AuditySampleSetAsset (its Set), an
UnityEngine.AudioClip, an DarkEffekt.Audity.AuditySample, or any custom
UnityEngine.Audio.IAudioGenerator Object. Returns null (with no warning) for null
input; returns null for non-promotable objects (a Sound Graph, say).
public static AuditySampleSet FromObject(Object source)Returns
Section titled “Returns”DarkEffekt.Audity.AuditySampleSet
Parameters
Section titled “Parameters”| Type | Name |
|---|---|
UnityEngine.Object |
source |
ContentHash()
Section titled “ContentHash()”Content-identity hash over the RESOLVED set: per-entry clip identity, every serialized setting on settings-bearing samples, weight, and selection policy. Serializing the complete sample payload deliberately makes newly added serialized playback settings invalidate an existing bank without requiring a matching hash change. Two Sets with the same resolved content - an asset and an inline copy of it - hash equal, so they share one resident bank. Session-stable only (uses object entity ids), which is all runtime bank identity needs.
public ulong ContentHash()Returns
Section titled “Returns”System.UInt64