Getting strange errors while importing audio for Block Breaker

I’m getting these strange errors while importing the audio clips for this lecture.

The audio icons look weird and they do not look like Rick’s icons in the video. I’ve never had this problem before with other courses or audio clips. This is a first for me.

At first, I did not have VLC installed (due to a recent OS reload) and the clips would not play at all. I installed VLC and the clips will play when I click on them, but I cannot assign a clip to the ball Audio Source as the clips are not detected by Unity. The audio clip icon did not change after installing VLC.

I have tried:

  • Double-checking the audio format is ogg vorbis
  • Deleting the audio clips and re-importing them
  • Deleting the downloads and re-downloading / reimporting
  • Closing and restarting Unity

I also tried deleting the audio files from Unity and my computer, rebooting my computer, and re-downloading and re-importing them, but that didn’t help either.

I’m also seeing this message that says the selection contains different compression formats to the default settings for the current build platform so I’m trying to figure out where to make some changes that I can test, but I don’t know exactly where to look at the moment.

/* Another thing about this Different Compression formats notion is that the Original size is reading 0 and the imported size is also reading 0. I think this might be a key to my issue, but way below at the bottom of this post you’ll see that I went into the Project Settings → Player Settings → Publishing Settings and tried all of the different options. */

When I click on one of the error messages, I see this text, so I’m also trying to make sense of it. This message is suggesting that Unity may have changed and these files are too short in length and may need to be longer, so I think it might be best to try creating a few slightly longer sound effect files to test them.

I recorded a new audio clip using Audacity and exported it as an ogg file. The clip is about 3 seconds long and I got the exact same result so I’m sure there is nothing wrong with the audio files.

Installed Ffmpeg and still no luck.

Another thing I tried was changing the settings under Project Settings → Player → Publishing Settings

I had previously changed this to ‘Disabled’ because I made a build last night and the game will not upload to itch.io if I use the Brotli or GZip settings. So I tried all three of these options and no luck.

There has to be something much more fundamental going on here. This task shouldn’t be this complicated and there has got to be something I’m missing, or something that may not have been installed properly.

Are you running on Linux? It might be a linux Unity specific thingy/issue.

Try adding a wav file instead of a oog file. See if that changes anything. If not, try mp3.

Yes, I’m using Linux Pop!OS. I didn’t have this problem a few years ago when I did Project Boost. That was also an ogg file.

I also didn’t have a problem when I did Argon Assault but that was an MP3 file for the music.

These statements both refer to the old versions of the courses. I just checked the old download files to verify the file types.

I tried to create an MP3 and a WAV file with Audacity as seen here. The files Boing2 and Boing3 are MP3 and WAV respectively. Neither file worked. Boing is an ogg export.

I also found this link referring to Linux audio issues…but as I mentioned, I didn’t run into these issues when working in the 3D courses a few years ago.

https://forum.unity.com/threads/unspecified-error-during-import-of-audioclip-2019-1-0f2-linux.663331/

The search continues.

Yeah, I tried to run Unity on Linux a bunch of years ago. It was not a fun experience. I just wasn’t experienced enough in linux to amke it work. There were so many issues and virtually no support/help/documentation so I switched back to Windows. Switching to windows is about the best fix I can offer.

Well, ummm…being unemployed, as well as broke…ummm…buying a new computer is just not a viable solution for me…besides, this worked fine a few years ago.

Thank you for trying anyway. You gave me a few ideas to check out and I appreciate that.

I get the money thing. It sucks. Is it because the computer specs are too low for Windows to work on it?

The only thing I could think of is whether the audio device driver is working properly, but I have no idea on what’s involved with working that out.

As for working before, have you updated unity since? If so, try the older version that was working for you and see if it’s the unity version that’s the issue.

Good luck.

???

Oh Hell no. I bought a native Linux computer because I can’t stand Windows with a passion. They can keep all their bloatware and proprietary garbage. I don’t want anything to do with it. I only use Windows when it’s work related.

I use a System76 Oryx Pro and even though it’s six years old, this thing is still a beast and my next computer is going to be another by the same company.

I’ve updated my computer and reloaded the OS several times in the past few years, but I don’t remember the particular Unity installation I was using back then.

I took an extended break to study React and JavaScript, so I’ve only been back into Unity for a month or so now.

Unity and VS Code definitely have their quirks when running on a Linux box, but I never had this problem before.

Okay, so I left the house and went to Taekwondo for a while.

I just got back and I sat down and looked at the message again…

…the current default build platform…current default build platform…build platform…build platform…

I had a moment of clarity and it hit me. I changed the build platform from WebGL to the Windows, Mac, Linux setting and everything came right up as it should.

My game was set up for a WebGL build. I made a test build last night to put on my itch.io account.

I think I’m back on track. I knew it was something so fundamental that it was stupid.

The hardest problems are always like that.

Final edit for the night…I tried to play my game but there was still no sound. I could get sound to play in the editor, and only the initial ‘click’ because of ‘Play On Awake’ but no other game play sounds were happening.

Then I remembered that I only made it halfway through the lesson before I got hung-up. I needed to finish watching the video and add the code to get the sound to play on collision.

I was able to finish the lesson, add in the requisite code, and everything is confirmed working again.

I was thinking of calling 1-800-273-8255 to ask for some help, but now it’s time for bed.

Thank you Me. You did okay today.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms