logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Enum AudioPriorityPolicy

    Determines how the audio player should behave when a clip is requested but no free AudioSource is available in the pool.
    Priority is expressed in Serenity semantics: a higher numeric priority means the sound is more important (the opposite of Unity's AudioSource.priority).

    Namespace: Serenity.AudioPlayer.Domain.Types
    Assembly: Serenity.AudioPlayer.Domain.dll
    Syntax
    public enum AudioPriorityPolicy
    Remarks

    IgnoreIfNoSourceAvailable is intentionally the first value (0) so that it is the default for freshly deserialized clip definitions and newly constructed clips, preserving the historical "drop the sound when the pool is full" behavior.

    Fields

    Name Description
    AlwaysReplace

    Reassign the least important replaceable source regardless of its priority, even if it is more important than the requested sound.

    IgnoreIfNoSourceAvailable

    Do not play the new sound when the pool is full. This is the default and matches the original audio player behavior.

    ReplaceLowerOrEqualPriority

    Reassign a currently playing source if its priority is lower than or equal to the requested sound's priority.

    ReplaceLowerPriority

    Reassign a currently playing source only if its priority is strictly lower than the requested sound's priority.

    In this article
    © 2026 Serenity. All Rights Reserved