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
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 |