pub struct AudioClip {Show 20 fields
pub m_Name: String,
pub m_3D: Option<bool>,
pub m_Ambisonic: Option<bool>,
pub m_AudioData: Option<Vec<u8>>,
pub m_BitsPerSample: Option<i32>,
pub m_Channels: Option<i32>,
pub m_CompressionFormat: Option<i32>,
pub m_Format: Option<i32>,
pub m_Frequency: Option<i32>,
pub m_IsTrackerFormat: Option<bool>,
pub m_Legacy3D: Option<bool>,
pub m_Length: Option<f32>,
pub m_LoadInBackground: Option<bool>,
pub m_LoadType: Option<i32>,
pub m_PreloadAudioData: Option<bool>,
pub m_Resource: Option<StreamedResource>,
pub m_Stream: Option<i32>,
pub m_SubsoundIndex: Option<i32>,
pub m_Type: Option<i32>,
pub m_UseHardware: Option<bool>,
}Expand description
AudioClip is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: A container for audio data. An AudioClip stores the audio file either compressed as ogg vorbis or uncompressed.
AudioClips are referenced and used by AudioSources to play sounds.See Also: AudioClip component in the Components Reference.
Fields§
§m_Name: StringThe name of the object.
m_3D: Option<bool>bool: (3.4.0 - 4.7.2)
m_Ambisonic: Option<bool>Returns true if this audio clip is ambisonic (read-only). bool: (2017.1.0b1 - 2022.3.2f1)
m_AudioData: Option<Vec<u8>>Vec
m_BitsPerSample: Option<i32>i32: (5.0.0f4 - 2022.3.2f1)
m_Channels: Option<i32>The number of channels in the audio clip. (Read Only) i32: (5.0.0f4 - 2022.3.2f1)
m_CompressionFormat: Option<i32>i32: (5.0.0f4 - 2022.3.2f1)
m_Format: Option<i32>i32: (3.4.0 - 4.7.2)
m_Frequency: Option<i32>The sample frequency of the clip in Hertz. (Read Only) i32: (5.0.0f4 - 2022.3.2f1)
m_IsTrackerFormat: Option<bool>bool: (5.0.0f4 - 2022.3.2f1)
m_Legacy3D: Option<bool>bool: (5.0.0f4 - 2022.3.2f1)
m_Length: Option<f32>The length of the audio clip in seconds. (Read Only) f32: (5.0.0f4 - 2022.3.2f1)
m_LoadInBackground: Option<bool>Corresponding to the “Load In Background” flag in the inspector, when this flag is set, the loading will happen delayed without blocking the main thread. bool: (5.0.0f4 - 2022.3.2f1)
m_LoadType: Option<i32>The load type of the clip (read-only). i32: (5.0.0f4 - 2022.3.2f1)
m_PreloadAudioData: Option<bool>Preloads audio data of the clip when the clip asset is loaded. When this flag is off, scripts have to call AudioClip.LoadAudioData() to load the data before the clip can be played. Properties like length, channels and format are available before the audio data has been loaded. bool: (5.0.0f4 - 2022.3.2f1)
m_Resource: Option<StreamedResource>StreamedResource: (5.0.0f4 - 2022.3.2f1)
m_Stream: Option<i32>i32: (3.4.0 - 4.7.2)
m_SubsoundIndex: Option<i32>i32: (5.0.0f4 - 2022.3.2f1)
m_Type: Option<i32>i32: (3.4.0 - 4.7.2)
m_UseHardware: Option<bool>bool: (3.4.0 - 4.7.2)