First time running into this, when I imported a .ogg sound to Unity 2020. Strnage thing is, I imported tons of other .ogg sound into my other project, all made the same way.
Google returns nothing of use.
Unknown platform passed to AudioImporter.SetOverrideSampleSettings (WSA), please use one of ‘Web’, ‘Standalone’, ‘iOS’, ‘Android’, ‘WebGL’, ‘PS4’, ‘XboxOne’ or ‘WSA’ UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Hi there, I’m getting the same error. I’m using 2019.4.9f1. I just upgraded my project that I’ve been working on since February of this year. I’ve changed version several times and the error just appear today. I’ve done two things with music specifically:
Imported a music track from MyAssets within the Unity Editor.
Drag and dropped two music tracks from my computer directly into my project folder via the Unity Editor.
When the files first import no error appears, but when I click on the file to see its properties I get the error. Any subsequent interaction in the inspector window continues to output the error: one or two errors of the exact same time type for every interaction with the file or properties.
Again, I just had this project in 2019.4.8 and I never got this error. I’m on Windows 10, one of the tracks I’m importing is .wav and the other two are .mp3, all tracks have the default Unity settings applied in the inspector.
Same here but for VideoClips. This message appears after upgrading to Unity 2019.4.9f1 from 2019.3.2f1, as described by univepro. The build target is set to UWP.
I got the same problem when updating my project from 2019.1 to 2019.4LTS. My solution was to uninstall 2019.4LTS and reinstall 2019.4LTS but to deselect support module for “Universal Windows Platform Build Support” (which I newer used before).
This module is preselected by default when installing with the Unity Hub. Also this reinstall solved some warnings related to ogg. audio files like “FSBTool WARNING: This source file was truncated.” which I also have had never before.
Same issue here. I also reinstalled 2019.4.9f1 without Universal Windows Platform Build Support and I no longer get the error when selecting an audio file in Unity project explorer window.
I do build Universal Windows Platform builds, which means this is not really a fix for me. But wanted to post and mention that the previous comment did make things work on my machine too (PC, not a mac).
Just extra info for the Unity team: The documentation on 2019.4 about AudioImporter.GetOverrideSampleSettings does not mention WSA as a valid parameter. However the error message does.
Documentation:
Error message:
Unknown platform passed to AudioImporter.GetOverrideSampleSettings (WSA), please use one of ‘Web’, ‘Standalone’, ‘iOS’, ‘Android’, ‘WebGL’, ‘PS4’, ‘XboxOne’ or ‘WSA’
UnityEditor.Experimental.AssetImporters.AssetImporterEditor:InternalSetTargets(Object[ ])
I have also been getting this error (with recent 2019.4.x versions - including latest at the time of writing 2019.4.10f1). Also using UWP. Seems to be generated sometimes (but not always) after playing back an audio clip via the editor/inspector - but only after the clip has finished playing. Weird as the audio clips themselves (mainly .wav format) have been unchanged since added to the project over the last year or so - and everything seems to function OK otherwise.
Having the exact same issue. Went from 2019.4.3 to 2019.4.10. Whenever I try to add sound clips to my project they won’t play and I see this error when clicking on them. All sound files that were in my project before upgrading seem to still work.
After a bit more investigation today, I found the issue the OP, myself and several other experience could be related to the DSP Buffer Size. I need to verify this with others who experience this issue (as they posted here in this thread).
To reiterate, total of two issues were mentioned above:
Error message being displayed when an audio asset is selected in the Unity Inspector.
Distorted audio is played back when an audio asset is selected in the Unity Inspector.
Here are steps to verify whether it is related to DSP Buffer Size or not:
Go to your Edit → Project Settings
Select Audio from the list
Select the different DSP Buffer Size values and each time click on the audio asset file (an play a preview).
If you experience the same issue when you select one of the DSP Buffer Size values, but not experience the issue when you select another, then we are one step closer to help the Unity team finding out what it could be related.
Running into the same problem with 2019.4.10f1 and was not able to build for android. Changed the DSP Buffer Size to “Best Performance” and everything is working now.
I’ve just got the same issue here, thankfully I’m only learning and haven’t done anything substantial so no major frustration. But just for the record changing the DSP Buffer Size made no difference, with the error appearing after selecting every option. Additionally for me anyhow, audio works fine when a build is made and launched from the computer but not audible within unity when creating or playing you game.
Error mentioned also appears regardless of the audio format or project including a new blank project.
Has anyone figured this out yet?
I keep getting the same error with all audio files. And can not get them to work in programs.
I have tested in 2020.17f1 and 2020.1.6f1. Same symptoms in both.
Started projects from scratch, even used audio files from Unit training course.
Tested in 2018.4.27f1, and it worked fine.
I updated all the divers (including audio drivers) on my computer, still having issues.
Did not uninstall and re-install. I would like to have UWB, although I may try that next since I am mainly using WindowsGL at this time.
I have tired various sound formats, with the same results
I also faced to this issue when I trying to drag and drop the file to script directly.
Then I added Audio Source component to the game object. Then drag and dropped the audio file to that Audio Source component. Then I used that component in my script.
version 2020.1.8f1 - Same issue. I get the errors:
“Unknown platform passed to AudioImporter.GetOverrideSampleSettings (WSA), please use one of ‘Web’, ‘Standalone’, ‘iOS’, ‘Android’, ‘WebGL’, ‘PS4’, ‘XboxOne’ or ‘WSA’
UnityEditor.Experimental.AssetImporters.AssetImporterEditor:InternalSetTargets(Object[ ])”
and
“Unknown platform passed to AudioImporter.ContainsSampleSettingsOverride (WSA), please use one of ‘Web’, ‘Standalone’, ‘iOS’, ‘Android’, ‘WebGL’, ‘PS4’, ‘XboxOne’ or ‘WSA’
UnityEditor.Experimental.AssetImporters.AssetImporterEditor:InternalSetTargets(Object[ ])”
when previewing the audio in the editor, and no sound or error in play mode.