logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class AudioListenerSandbox

    Gives a test full control over which UnityEngine.AudioListener components are active: it switches off every listener already in the scene, creates the listeners a test asks for, and puts everything back on dispose.

    Inheritance
    object
    AudioListenerSandbox
    Implements
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Tests.Shared.Audio
    Assembly: Tests.dll
    Syntax
    public sealed class AudioListenerSandbox : IDisposable

    Constructors

    AudioListenerSandbox()

    Declaration
    public AudioListenerSandbox()

    Methods

    CreateListener(string)

    Declaration
    public AudioListener CreateListener(string listenerName = "SandboxAudioListener")
    Parameters
    Type Name Description
    string listenerName
    Returns
    Type Description
    AudioListener

    Dispose()

    Declaration
    public void Dispose()

    Implements

    IDisposable
    In this article
    © 2026 Serenity. All Rights Reserved