Class AudioPlayableAsset | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class AudioPlayableAsset

    PlayableAsset wrapper for an AudioClip in Timeline.

    Inheritance
    System.Object
    AudioPlayableAsset
    Namespace: UnityEngine.Timeline
    Syntax
    [Serializable]
    public class AudioPlayableAsset : PlayableAsset, ITimelineClipAsset

    Properties

    clip

    The audio clip to be played

    Declaration
    public AudioClip clip { get; set; }
    Property Value
    Type Description
    AudioClip

    clipCaps

    Returns the capabilities of TimelineClips that contain an AudioPlayableAsset

    Declaration
    public ClipCaps clipCaps { get; }
    Property Value
    Type Description
    ClipCaps
    Implements
    ITimelineClipAsset.clipCaps

    duration

    Returns the duration required to play the audio clip exactly once

    Declaration
    public override double duration { get; }
    Property Value
    Type Description
    System.Double

    loop

    Whether the audio clip loops.

    Declaration
    public bool loop { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Use this to loop the audio clip when the duration of the timeline clip exceeds that of the audio clip.

    outputs

    Returns a description of the PlayableOutputs that may be created for this asset.

    Declaration
    public override IEnumerable<PlayableBinding> outputs { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<PlayableBinding>

    Methods

    CreatePlayable(PlayableGraph, GameObject)

    Creates the root of a Playable subgraph to play the audio clip.

    Declaration
    public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    Parameters
    Type Name Description
    PlayableGraph graph

    PlayableGraph that will own the playable

    GameObject go

    The GameObject that triggered the graph build

    Returns
    Type Description
    Playable

    The root playable of the subgraph

    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