AudioClip serves as a container for audio data, including music, voiceovers, and sound effects. It offers properties and methods to access playback details like length, samples, channels, and frequency. AudioClip supports preloading, 3D audio, and background loading. Custom AudioClip instances can be created programmatically. Fundamental for auditory experiences in Unity projects, AudioClip documentation provides further details. Unity's AudioClip Documentation
Properties
Represents the number of audio channels, such as 1 for mono or 2 for stereo. Unity's AudioClip.channels Documentation
Denotes the sample rate of the clip in kHz, indicating the samples per second. Unity's AudioClip.frequency Documentation
Returns the clip's duration in seconds, akin to a song's length. Unity's AudioClip.length Documentation
Specifies if the clip should load in the background, allowing gameplay to continue. Unity's AudioClip.loadInBackground Documentation
Controls whether the audio data should be preloaded upon clip asset loading. Unity's AudioClip.preloadAudioData Documentation
Refers to the total number of audio samples within the clip. Unity's AudioClip.samples Documentation
Methods
Initiates loading of the clip's audio data, particularly when 'preloadAudioData' is false. Unity's AudioClip.LoadAudioData Documentation
Returns
True if data loading starts successfully.
Unloads the clip's audio data from memory, aiding in efficient memory usage. Unity's AudioClip.UnloadAudioData Documentation
Returns
True if data unloading begins successfully.
Updated 12 days ago