- Home /
Question by
Skjalg · Aug 07, 2012 at 08:50 AM ·
assetpostprocessorrenameaudioimporter
How can I rename an audio clip when importing?
Hi,
When I receive a batch of files from our audio guy they are usually named with whitespaces and non-english letters. I have made a method that renames the files, but I cant seem to get it working with the postprocessor. Does anyone know how I can rename a file in the postprocessor?
public class AudioPostProcessor : AssetPostprocessor
{
public void OnPreprocessAudio()
{
assetPath = FileUtil.ReplaceSpaceWithUnderscore(assetPath);
// Try to rename file
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613075311im_/https://answers.unity.com/themes/thub/images/avi.jpg)