Here is a class that will help you managing sounds on your game. It gives you an easy way to mute/unmute your BGM, SFX, or both. No need to check mute/unmute state manually anymore, this class will do that for you.
This class also ensure the currently BGM doesn't replayed accidentally. Say, you have 3 scene. In scene1 you play bgm1. Then the scene changes to scene2. In scene2 you call the code to play bgm1. Normally, bgm1 will replayed. This class will automatically prevent that. Sorry for my bad explanation. Just try it yourself
also (will be)