Reputation: 30855
I am currently deploying to IOS, but plan to deploy to Android and other platforms down the road.
I need to know whether the system volume is turned off so that I can show a relevant icon on the screen.
Within Unity, is there a way to determine whether the system volume is muted?
Upvotes: 2
Views: 1215
Reputation: 5122
I am not aware of Unity functionality that would allow you to do that (because AudioSource is tied to object, not to "application" itself) - but maybe there is some magical utility that allows you to do that. The problem is that even checking in pure iOS is not as easy as checking one property, since system itself does not indicate it, or at least it does not work for later version (iOS7, 8 - and possibly 9)
Anyway, I personally think that you have to resort to system specific implementation for both Android and iOS (and whatever you want to support). For iOS, there are great posts that go to great detail, I suggest you check them:
https://hoishing.wordpress.com/2014/05/08/mute-checking-in-ios7/ Detecting Silent Switch in iOS 7 issue
Hope it helps a little, though I guess I did not bring any good news :)
Upvotes: 2