/// <summary> /// Gathers parameters from the specified AudioClip. /// </summary> /// <param name="window">The asset window.</param> public void OnLoad(AudioClipWindow window) { // Link _window = window; // Try to restore target asset AudioClip import options (useful for fast reimport) AudioImportSettings.TryRestore(ref ImportSettings, window.Item.Path); // Prepare restore data PeekState(); }
/// <summary> /// Imports the audio asset file to the target location. /// </summary> /// <param name="inputPath">The source file path.</param> /// <param name="outputPath">The result asset file path.</param> /// <param name="settings">The settings.</param> /// <returns>True if importing failed, otherwise false.</returns> public static bool Import(string inputPath, string outputPath, AudioImportSettings settings) { if (settings == null) { throw new ArgumentNullException(); } AudioImportSettings.InternalOptions internalOptions; settings.ToInternal(out internalOptions); return(Internal_ImportAudio(inputPath, outputPath, ref internalOptions)); }
public static bool Import(string inputPath, string outputPath, AudioImportSettings settings) { if (settings == null) { throw new ArgumentNullException(); } #if UNIT_TEST_COMPILANT throw new NotImplementedException("Unit tests, don't support methods calls. Only properties can be get or set."); #else AudioImportSettings.InternalOptions internalOptions; settings.ToInternal(out internalOptions); return(Internal_ImportAudio(inputPath, outputPath, ref internalOptions)); #endif }