logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityAudioPlayerGateway

    Unity-specific audio player gateway that manages multiple audio player services.
    Routes audio playback requests to the appropriate service based on service ID.

    Inheritance
    object
    UnityAudioPlayerGateway
    Implements
    IAudioPlayerGateway
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.InterfaceAdapters.Gateways
    Assembly: Serenity.UnityAudioPlayer.InterfaceAdapters.dll
    Syntax
    public class UnityAudioPlayerGateway : IAudioPlayerGateway

    Constructors

    UnityAudioPlayerGateway(Dictionary<string, IAudioPlayerService>)

    Initializes the gateway with a collection of audio player services.

    Declaration
    public UnityAudioPlayerGateway(Dictionary<string, IAudioPlayerService> audioPlayerServices)
    Parameters
    Type Name Description
    Dictionary<string, IAudioPlayerService> audioPlayerServices

    Dictionary of service ID to audio player service mappings

    Fields

    _audioPlayerServices

    Declaration
    protected Dictionary<string, IAudioPlayerService> _audioPlayerServices
    Field Value
    Type Description
    Dictionary<string, IAudioPlayerService>

    Dictionary mapping service IDs to their corresponding audio player service instances.

    Methods

    PauseAllClips(AudioPlayerPauseAllClipsInput)

    Routes pause all clips request to the appropriate audio player service.
    Pauses all currently playing clips on the specified service.

    Declaration
    public void PauseAllClips(AudioPlayerPauseAllClipsInput input)
    Parameters
    Type Name Description
    AudioPlayerPauseAllClipsInput input

    Input DTO containing service ID for pause operation

    PlayClip(AudioPlayerPlayClipInput)

    Routes audio clip play request to the appropriate audio player service.
    Delegates to the service identified by the input's service ID.

    Declaration
    public void PlayClip(AudioPlayerPlayClipInput input)
    Parameters
    Type Name Description
    AudioPlayerPlayClipInput input

    Input DTO containing service ID and audio clip to play

    ResumeAllClips(AudioPlayerResumeAllClipsInput)

    Routes resume all clips request to the appropriate audio player service.
    Resumes all previously paused clips on the specified service.

    Declaration
    public void ResumeAllClips(AudioPlayerResumeAllClipsInput input)
    Parameters
    Type Name Description
    AudioPlayerResumeAllClipsInput input

    Input DTO containing service ID for resume operation

    StopAllClips(AudioPlayerStopAllClipsInput)

    Routes stop all clips request to the appropriate audio player service.
    Stops all currently playing clips on the specified service.

    Declaration
    public void StopAllClips(AudioPlayerStopAllClipsInput input)
    Parameters
    Type Name Description
    AudioPlayerStopAllClipsInput input

    Input DTO containing service ID for stop operation

    Implements

    IAudioPlayerGateway
    In this article
    © 2026 Serenity. All Rights Reserved