Unity3D/Tips
Unity app stops background music(앱 실행 시, 타 앱 사운드 끄기)
blueasa
2018. 4. 19. 11:25
앱 실행 시, 타 앱(멜론이나 벅스뮤직 등)의 백그라운드에서 재생되는 음원을 끄게 할 수 없냐고 말이나와서 권한 문제로 안될 줄 알았는데..
유니티 셋팅에 보니 PlayerSettings-Other Settings에 Mute Other Audio Sources 옵션이 있다.
켜주니 타 앱 사운드가 잘 꺼진다.
[Android 주의사항]
- Android Marshmallow (6.0) 이상은 READ_PHONE_STATE permission을 추가해줘야 된다고 한다.
[출처] https://stackoverflow.com/questions/39080989/unity-app-stops-background-music
[참조] https://docs.unity3d.com/ScriptReference/PlayerSettings-muteOtherAudioSources.html
반응형