Struct AudioConfig | Project Tiny | 0.32.0-preview.54
docs.unity3d.com
    Show / Hide Table of Contents

    Struct AudioConfig

    Namespace: Unity.Tiny
    Syntax
    public struct AudioConfig : IComponentData

    Fields

    initialized

    True if the audio context is initialized.

    Declaration
    public bool initialized
    Field Value
    Type Description
    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.

    maxUncompressedAudioMemoryBytes

    This is the memory limit, in bytes, for sounds that are decompress-on-demand.

    Declaration
    public int maxUncompressedAudioMemoryBytes
    Field Value
    Type Description
    Int32

    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
    Boolean

    unlocked

    True if the audio context is unlocked in the browser.

    Declaration
    public bool unlocked
    Field Value
    Type Description
    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.

    Properties

    Default

    Declaration
    public static AudioConfig Default { get; }
    Property Value
    Type Description
    AudioConfig
    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