Class AudioPlayableAsset
PlayableAsset wrapper for an AudioClip in Timeline.
Inherited Members
Namespace: UnityEngine.Timeline
Assembly: Unity.Timeline.dll
Syntax
[Serializable]
public class AudioPlayableAsset : PlayableAsset, IPlayableAsset, 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 |
duration
Returns the duration required to play the audio clip exactly once
Declaration
public override double duration { get; }
Property Value
Type | Description |
---|---|
double |
Overrides
loop
Whether the audio clip loops.
Declaration
public bool loop { get; set; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
IEnumerable<PlayableBinding> |
Overrides
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 |