AudioController.PlayAudioSubItem Method

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
Plays a specific AudioSubItem.

Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)

Syntax

C#
public AudioObject PlayAudioSubItem(
	AudioSubItem subItem,
	float volume,
	Vector3 worldPosition,
	Transform parentObj,
	float delay,
	float startTime,
	bool playWithoutAudioObject,
	AudioObject useExistingAudioObj,
	double dspTime = 0,
	bool playAsMusicOrAmbienceSound = false
)

Parameters

subItem
Type: (Default Namespace)..::..AudioSubItem
the AudioSubItem
volume
Type: System..::..Single
the volume
worldPosition
Type: Vector3
the world position
parentObj
Type: Transform
the parent object, or null
delay
Type: System..::..Single
the delay in seconds
startTime
Type: System..::..Single
the start time seconds
playWithoutAudioObject
Type: System..::..Boolean
if trueplays the audio by using the Unity function PlayOneShot without creating an audio game object. Allows playing audios from within the Unity inspector.
useExistingAudioObj
Type: (Default Namespace)..::..AudioObject
if specified this existing audio object is used instead of creating a new AudioObject
dspTime (Optional)
Type: System..::..Double
The high precision DSP time at which to schedule playing the audio [default=0]
playAsMusicOrAmbienceSound (Optional)
Type: System..::..Boolean
if trueplays the audio as music or ambience track [default=false]

Return Value

Type: AudioObject
The created AudioObject or null

Remarks

This function is used by the editor extension and is normally not required for application developers. Use Play(String) instead.

See Also