Struct AudioConfig | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct AudioConfig

    Configures the global audio state, which you can access via TinyEnvironment.GetConfigData This component is attached to the Config entity.

    Namespace: Unity.Tiny.Audio
    Syntax
    public struct AudioConfig : IComponentData

    Fields

    initialized

    True if the audio context is initialized.

    Declaration
    public bool initialized
    Field Value
    Type Description
    System.Boolean
    Remarks

    After you export and launch the project, and the AudioSystem updates for the first time, the AudioConfig component attempts to initialize audio. If successful, it sets this value to true.

    Once audio is initialized successfully the AudioConfig component does not re-attempt to initialize it on subsequent AudioSystem updates.

    paused

    If true, pauses the audio context. Set this at any time to pause or resume audio.

    Declaration
    public bool paused
    Field Value
    Type Description
    System.Boolean

    unlocked

    True if the audio context is unlocked in the browser.

    Declaration
    public bool unlocked
    Field Value
    Type Description
    System.Boolean
    Remarks

    Some browsers require a user interaction, for example a touch interaction or key input, to unlock the audio context. If the context is locked no audio plays.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023