Unity Android: AudioSource.Play() works in Editor but no sound until first screen tap on device

1 day ago 1
ARTICLE AD BOX

I am building a "Virtual Human Front Desk" app in Unity 2022.3 (C#) for Android.

The app flow:

Download TTS audio (WAV or MP3) from a remote API Convert it to an AudioClip Play it using AudioSource

The problem:

In the Unity Editor, audio plays correctly.

On Android (real device), AudioSource.Play() appears to run (isPlaying = true), but there is no sound until the user taps the screen once. After the first tap, audio works normally for the rest of the session.

Observations:

No errors in Logcat Microphone permission is granted AudioSource volume is 1 Output Audio Mixer is default App is not muted Unity version: 2022.3.x LTS Target platform: Android Scripting backend: IL2CPP Audio type: downloaded WAV / MP3

It seems like Android requires some form of user interaction before audio playback is allowed.

Is there a recommended way to programmatically initialize/unlock audio playback at app startup?

Read Entire Article