AudioImporter

Struct AudioImporter 

Source
pub struct AudioImporter {
Show 26 fields pub m_3D: bool, pub m_ForceToMono: bool, pub m_Name: String, pub audio_preview_data: Option<Vec<u8>>, pub m_Ambisonic: Option<bool>, pub m_AssetBundleName: Option<String>, pub m_AssetBundleVariant: Option<String>, pub m_DefaultSettings: Option<SampleSettings>, pub m_ExternalObjects: Option<Vec<(SourceAssetIdentifier, PPtr)>>, pub m_FileIDToRecycleName: Option<Vec<(i32, String)>>, pub m_Format: Option<i32>, pub m_LoadInBackground: Option<bool>, pub m_Loopable: Option<bool>, pub m_NewHashIdentity: Option<MdFour>, pub m_Normalize: Option<bool>, pub m_OldHashIdentity: Option<MdFour>, pub m_Output: Option<Enum_Output__AudioImporterOutput>, pub m_PlatformSettingOverrides: Option<Vec<(i32, SampleSettings)>>, pub m_PreloadAudioData: Option<bool>, pub m_PreviewData: Option<PreviewData>, pub m_PreviewDataLength: Option<u32>, pub m_Quality: Option<f32>, pub m_Stream: Option<i32>, pub m_UseHardware: Option<bool>, pub m_UsedFileIDs: Option<Vec<i64>>, pub m_UserData: Option<String>,
}
Expand description

AudioImporter is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: Audio importer lets you modify AudioClip import settings from editor scripts. Settings of this class match the ones exposed in Audio Import Settings.

Fields§

§m_3D: bool§m_ForceToMono: bool

Force audioclips to mono?

§m_Name: String

The name of the object.

§audio_preview_data: Option<Vec<u8>>

Vec: (3.4.0 - 3.5.7)

§m_Ambisonic: Option<bool>

When this flag is set, the audio clip will be treated as being ambisonic. bool: (2017.1.0b1 - 2022.3.2f1)

§m_AssetBundleName: Option<String>

Get or set the AssetBundle name. String: (5.0.0f4 - 2022.3.2f1)

§m_AssetBundleVariant: Option<String>

Get or set the AssetBundle variant. String: (5.0.0f4 - 2022.3.2f1)

§m_DefaultSettings: Option<SampleSettings>

SampleSettings: (5.0.0f4 - 2022.3.2f1)

§m_ExternalObjects: Option<Vec<(SourceAssetIdentifier, PPtr)>>

Vec<(SourceAssetIdentifier, PPtr<[Object]>)>: (2017.2.0b2 - 2022.3.2f1)

§m_FileIDToRecycleName: Option<Vec<(i32, String)>>

Vec<(i32, String)>: (3.4.0 - 3.4.2)

§m_Format: Option<i32>

i32: (3.4.0 - 4.7.2)

§m_LoadInBackground: Option<bool>

Corresponding to the “Load In Background” flag in the AudioClip inspector, when this flag is set, the loading of the clip will happen delayed without blocking the main thread. bool: (5.0.0f4 - 2022.3.2f1)

§m_Loopable: Option<bool>

bool: (3.4.0 - 4.7.2)

§m_NewHashIdentity: Option<MdFour>

MdFour: (3.4.0 - 3.4.2)

§m_Normalize: Option<bool>

bool: (5.1.2f1 - 2022.3.2f1)

§m_OldHashIdentity: Option<MdFour>

MdFour: (3.4.0 - 3.4.2)

§m_Output: Option<Enum_Output__AudioImporterOutput>

Output: (4.0.0 - 4.7.2); AudioImporterOutput: (5.0.0f4 - 2022.3.2f1)

§m_PlatformSettingOverrides: Option<Vec<(i32, SampleSettings)>>

Vec<(i32, SampleSettings)>: (5.0.0f4 - 2022.3.2f1)

§m_PreloadAudioData: Option<bool>

bool: (5.0.0f4 - 2022.2.0a16)

§m_PreviewData: Option<PreviewData>

PreviewData: (5.0.0f4 - 2022.3.2f1)

§m_PreviewDataLength: Option<u32>

u32: (3.4.0 - 3.5.7)

§m_Quality: Option<f32>

f32: (3.4.0 - 4.7.2)

§m_Stream: Option<i32>

i32: (3.4.0 - 4.7.2)

§m_UseHardware: Option<bool>

bool: (3.4.0 - 4.7.2)

§m_UsedFileIDs: Option<Vec<i64>>

Vec: (2019.1.0b1 - 2022.3.2f1)

§m_UserData: Option<String>

Get or set any user data. String: (4.0.0 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for AudioImporter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AudioImporter

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AudioImporter

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,