Contents

init(targetEntity:audioResourceName:gain:useControlledPlayback:)

Creates a new play audio action.

Declaration

init(targetEntity: ActionEntityResolution = .sourceEntity, audioResourceName: String, gain: Audio.Decibel = 0, useControlledPlayback: Bool = true)

Parameters

  • targetEntity:

    The entity to play the audio.

  • audioResourceName:

    The name of the audio stored in audio library component of the target entity to start playing.

  • gain:

    The individual gain in decibels of the audio.

  • useControlledPlayback:

    Determines whether this action has control over the playback of the audio.