Pre-importing audio files into the editor documentation

Mar, 4 2021— #docs

Here I will show you how to pre-import audio files into the editor using the Runtime Audio Importer plugin.

The plugin only supports pre-importing of the MP3 file format into the engine. This is intentional because this format supports the highest possible compression compared to WAV and FLAC.

To import an audio file into the editor, you need to make sure that all media plugins that are in any way related to the MP3 format are disabled. If it is not possible to disable them, you should rename the file extension from ".mp3" to ".imp" in order to successfully import the audio as an "Preimported Sound" asset.

Let's say we have an audio file called "AudioTest.mp3" that we need to import into the editor.

In case you have not disabled all media plugins associated with the .mp3 file extension, you need to rename the file to the .imp format. So the name of the file was "AudioTest.mp3", and then it became "AudioTest.imp".

To import it, simply drag the audio file from the explorer to the editor using the Drag & Drop method.

Asset that appeared after importing an MP3 (or .imp) audio file into the editor

Asset that appeared after importing an MP3 (or .imp) audio file into the editor

If errors occur when importing an audio file, the editor will warn you about this and you will see an error message in the console logs.

When you open an asset, you will see basic information about the audio file so that you can better distinguish between different audio assets

When you open an asset, you will see basic information about the audio file so that you can better distinguish between different audio assets

To use the imported sound, create Runtime Audio Importer object, bind the needed delegates and call the "Import Audio from Preimported Sound" method:

An example of calling the importing the

An example of calling the importing the "Import Audio from Preimported Sound" method

By Georgy Treshchev

Unreal Engine Developer. Contact for any questions. Telegram chat, e-mail, Github.