Class UnityAudioPlayerSourceState
Runtime metadata tracked per pooled UnityEngine.AudioSource so the audio player can make
priority-based replacement decisions without trying to infer everything from the
UnityEngine.AudioSource alone.
One instance is kept per slot, parallel to the service's AudioSource[] pool.
Inherited Members
Namespace: Serenity.AudioPlayer.Infrastructure.Services
Assembly: Serenity.UnityAudioPlayer.Infrastructure.dll
Syntax
public class UnityAudioPlayerSourceState
Constructors
UnityAudioPlayerSourceState(AudioSource)
Initializes a new state bound to the given source.
Declaration
public UnityAudioPlayerSourceState(AudioSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| AudioSource | source | The pooled audio source this state describes. |
Fields
CanBeReplaced
Declaration
public bool CanBeReplaced
Field Value
| Type | Description |
|---|---|
| bool | Whether the currently playing sound may be reassigned to a higher-priority sound. |
ClipId
Declaration
public string ClipId
Field Value
| Type | Description |
|---|---|
| string | Id of the clip currently assigned to the source (for logging/diagnostics). |
Priority
Declaration
public int Priority
Field Value
| Type | Description |
|---|---|
| int | Serenity priority of the currently playing sound. Higher = more important. |
PriorityPolicy
Declaration
public AudioPriorityPolicy PriorityPolicy
Field Value
| Type | Description |
|---|---|
| AudioPriorityPolicy | Policy of the currently playing sound (kept for diagnostics/future use). |
Sequence
Declaration
public long Sequence
Field Value
| Type | Description |
|---|---|
| long | Monotonically increasing start order used to break priority ties. A lower value means the sound started earlier (is older). |
Source
Declaration
public AudioSource Source
Field Value
| Type | Description |
|---|---|
| AudioSource | The pooled audio source this state describes. |