Hi Peter,
I have been using this. Great tool. Couple of things:
Sorting by “Load Type” doesn’t work.
Also, I think thre is an underlying problem with Unity reporting “Runtime Size” for Compressed files. If you happen to be in Windows / Linux build when importing clips, compression is set to Oggvorbis. Changing build type to Android then makes MPEG available, but for some reason, files that are set as Compressed get left as Oggvorbis in the preview pane. The runtime size for Oggvorbis files is much larger than their storage Size. Eg. Storage size might be “259KB” while Runtime Size 0.6MB. If you tweak a parameter on the file to force Unity to recompress it, the preview pane and Runtime Size is then displayed as 245.4KB and Mpeg. Have you come across this?
I think this is the source of much confusion in forum threads regarding the size of compressed files at run time.
I am thinking a useful addition to AudioClip explorer would be to force recompression of all files so that their Runtime Size is displayed correctly for MPEG. Hope that makes sense.
I haven’t come across this problem before, but I can partially reproduce it. I tested with Unity 4.1.2 as followed:
Switched Platform to Standalone
Added an AIF file to the project and selected it to show its properties in the unity inspector
Audio Format = Compressed (OGGVORBIS), Load Type=Compressed in memory, Runtime size=0.8mb, Storage size=0.5mb
Switched Platform to Android
Unity inspector still displays “Audio Format = Compressed (OGGVORBIS)”
Unity preview shows Runtime size=500kb (earlier it was 0.8mb)
Selecting a different clip in the project and then the just imported AIF again, updated the Inspector to “Audio Format = Compressed (MPEG)”
So I guess it works on my PC (except for the inspector refresh issue) or did I do anything wrong/different?
What unity version do you use? Does this problem occur with all clips in your project? Could you email (unitytools@console-dev.de) me a clip that displays an incorrect size after switching the platform? (I hardly believe it’s related to the clip, but you know there are sometimes the strangest bugs out there, so just to be sure).
If I have a reproduce for this problem, I can probably implement it, but I need that reproduce to actually test my code
I just submitted a new version to the AssetStore. If everything goes well and Unity let is pass, it should be online around 15th or 16th august, I guess.
Here is what has changed in version 1.9
New: Added ‘Find Prefabs in Project’ context menu button. It selects all prefabs in the project that use a particular audioclip.
Fix: Sorting by ‘Load Type’ column works now.
Fix: Clips in ‘Audio Format = MPEG’ were displaying ‘0 Bits’ as ‘Bits per Sample’ . Now an empty string is displayed, to match the Unity behaviour (Bits per sample isn’t displayed in the unity preview pane for clips in MPEG format).
I’ve just purchased the plugin, but I’m getting a “Download Failed” error message from the asset store when I try to get it into our project.
I suppose it could be that the new version you mention above is being published right now, meaning the plugin is unavailable for download…?
That’s a good question. If you still can’t download the package, please send me a private message with your email address and I’ll send you the plugin this way.
Sorry for the inconvenience.
PS: I just noticed the asset store displays “Size: 0 BYTES” for the package, which is totally wrong. I’ve contacted the asset store admin and asked to fix this issue.
Unity replied to my support request yesterday, saying they’re currently working on this issue. Unfortunalety, the problem is not fixed yet. I guess it’s also not going to happen during the weekend.
As I wrote before, I can send you the plugin via email. Just let me know where to send it to.
Hi Peter,
I have the latest version now and can confirm Load type sort is working now. Thanks.
I am using Unity Version 4.1.4f1. Steps to recreate the Runtime problem (Any old WAVs will do)…
Create new project.
Ensure build type is standalone.
Add two Wav files to the Asset directory. One fairly big one say 4MB, so we see the effects of compression.
Set the Large Wav to be Compressed (OGG) and say 96kbps.
Note the Storage and Runtime sizes for the OGG.
Switch the Build type to Android.
Switch between the clips to display their properties. You will note Audio Format (at top) eventually changes to MPEG. However, the PREVIEW pane (where the waveform to displayed at the bottom) will still say OGG.
Now load the clip size data in Audio Explorer. Runtime size will match the figures displayed in the Unity Clip Preview Pane.
Now (and only now) change some aspect of the Clip, EG. Uncheck “3D”. Unity will now recompress the file… to MPEG.
Inspect the runtime size of the clip and you will see that it is different (Smaller), and the Preview pane will now be updated to MPEG.
Basically, there is nothing wrong in Audio Explorer - it is reporting what it is told. The problem is with Unity. When a project build type is changed from Standalone → Android, any Stats for compressed samples remain displayed as for OGG (which is incorrect), until the user manually forces the clips to recompress. This is a laborious process. A button to do this in Audio Explorer would be great
I’m glad it finally works for you, thanks for letting me know!
Following the provided reproduce list step by step, I’m still not able to reproduce the issue. I’ll implement your suggested feature anyway, but without being able to thoroughly test it and then send you a copy under separate cover so you can check if it does the job for you.
A new version is available in the asset store now. Here is the changelog for version 2.0:
New: Added “Load all automatically” option to the “Tools” popup. If checked, AudioClip Explorer loads clip details automatically (the details where otherwise the “Load” button is displayed).
New: Added a cancable progress bar while audio clip importer settings are loaded, which happens when you start the plugin or on playmode changes.
New: Added “Reimport all” option to the “Tools” popup. This will force a reimport of all clips listed in AudioClip Explorer.
Fix: Context menu item “Delete” didn’t work when the Unity project pane was using “Two Column Layout” and a folder was selected. In this case AudioClip Explorer asked to delete the folder, rather than the clips selected in AudioClip Explorer.
Fix: Context menu item “Show in Explorer” wasn’t shown as “Reveal in Finder” when running Unity editor on MacOS. Fix: Text inside the list was sometimes cropped vertically.
Fix: Inactive selection color when using pro skin (dark theme) didn’t really match the color used in Unity itself for an inactive selection.
How well does this work in the case of very large number of audio files? I’m worried about potential out-of-memory errors when dealing with such a large number of files (the mere act of selecting 10k audio files in the unity editor itself crashes it cause it tries to generate previews and runs out of memory). If it can handle a lot of audio assets, I’d be on board!
We have about 3500 audio files in our project and it does work like a charm. I’ll create a test project with more than 4gb of audio clips and give it a try. If it runs into an out of memory issue, I’ll fix it. This is going to be some really boring import only day
I created a test project with more than 20000 audio files, which have an imported total size of 16 GB. 5000 wav’s where each is 3 MB, 15000 wav’s where each is 50 KB and a few more from the AngryBots projects duplicated several times.
The currently available AudioClip Explorer version (2.0) in the asset store does handle this amount of audio files, unless you click “Load all”. In this case AudioClip Explorer loads all the audio clip details (Duration, Frequency, etc) and then indeed shows an out-of-memory error when reaching the 4gb memory threshold. There are also some minor glitches, such as the summed total size in the bottom bar wraps at 4GB, due to using EditorUtility.FormatBytes.
However, I did fix all these issues by now. The next version will not have this memory limitation anymore and I also fixed all minor glitches I found so far. Version 2.1 does handle 20000 files (16 GB), even when using the “Load all” button. The list is also super fast when scrolling (just mentioning that, because I’ve seen plugins where the list gets slower the more items are added).
I’ll submit the new version to the asset store after having it thoroughly tested and put a note here when it’s online.
Awesome, thanks for the quick and informative reply, I’ll definitely give it a shot (and your Texture Overview looks just as useful). Just a random question though, for either tool, is it possible to filter texture/audio lists by folder or folder trees rather than entire projects?
Yes it is. You can push the magnifying glass icon in the text filter and select “Filter by Path”. You can then enter a path relative to the “Assets” directory and AudioClip Explorer (or any of my plugins) will display only assets that contain the specified text in their path.
I’m not entirely happy with this solution though. If you have any idea how filtering by path could be improved, let me know.