-
Notifications
You must be signed in to change notification settings - Fork 575
Volume control [GOMPS-373] #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume control [GOMPS-373] #195
Conversation
Adds a little slider for volume to the bottom-left of each UI screen. Stores this volume setting in PlayerPrefs. Since we don't have an icon for volume handy in the release branch, it's just labeled with the word "Volume", but it's set up in a prefab that should let us change that to a speaker icon without having to alter the scenes again. Because different UI screens have different scaling, it's hard to get the volume slider into the EXACT same spot on each screen without manually repositioning child elements -- and I wanted to avoid overriding any child-element positions, because because we want to replace the label with an icon later. So I changed the in-scene scale of the slider a little bit to make it approximately the same size and position on each screen. When final art is in, we can tweak position on each screen to get them to line up more precisely.
|
I just noticed there is already another PlayerPrefs call in the project (in ClientGameNetPortal). I've moved that into the ClientPrefs wrapper I made. (I know that's a bit presumptive of me, but in my experience having all the PlayerPrefs calls in the same location is a MASSIVE win for maintainability, and a personal best practice.) |
|
The music's relative volume was so loud that most sound-effects were entirely obscured. So I reduced the music-volume from 100% to 80% and changed the 3D drop-off range for the character prefabs so that sound-effects are louder. This gives us an adequate "mix" of music and game sounds -- at least enough to tell that sound-effects are playing! We may eventually want a simple "Settings" screen where music volume can be configured separately from overall game volume. (This isn't exactly related to the master-volume slider, since the problem is relative volume. But it was definitely a bug that you couldn't hear the sound effects! I kept trying to change the volume-slider to hear sounds, but never could, so I figured I'd better fix it. If this change is inappropriate here, I apologize... I can easily revert this part of the fix.) |
Reverted the Startup scene, then added the new prefab to it. The other scenes should all be unchanged from pre-patch now. Hopefully. (git was giving strange error messages about BossRoom.unity, but in any case, there SHOULD be no changes in this PR to any scene except Startup)
* release/v0.1.0-experimental: (97 commits) adding screenshots (#228) [GOMPS-352] Add audiomixer to project (#222) feature: transport picker improvements (#200) fixing issue where client disconnect boots everyone else (#229) removed GC allocs inside of AIBrain (#210) init client door with server's current value for IsOpen (#227) Photon Realtime Setup Guide for Boss Room (#225) Update README.md add link to doc (#226) Bug fix: hide icons for unimplemented attacks feature: v0.1.0 experimental updating to latest master mlapi (#220) fixing missing reference exceptions, and missing animation (#219) feat: replace with photon package (#218) Replaced LobbyPlayerArray with a NetworkList<LobbyPlayerState> (#217) ART: Warning Message fixes for models, animations, and Shader...and new App icon (#213) Updating to latest MLAPI on master (#214) null guard added inside of target action for accessing a possibly destroyed reticule (#212) [GOMPS-270] bossroom should let users specify connection port# (#205) Fix useless log error (#203) Bugfix: properly disconnect on quit [GOMPS-324][GOMPS-327][GOMPS-385] (#196) Volume control [GOMPS-373] (#195) ... # Conflicts: # README.md
Adds a little slider for volume to the bottom-left of each UI screen. Stores this volume setting in PlayerPrefs.
Since we don't have an icon for volume handy in the release branch, it's just labeled with the word "Volume", but it's set up in a prefab that should let us change that to a speaker icon without having to alter the scenes again.
Because different UI screens have different scaling, it's hard to get the volume slider into the EXACT same spot on each screen without manually repositioning child elements -- and I wanted to avoid overriding any child-element positions, because we want to replace the label with an icon later. So I changed the in-scene scale of the prefab a little bit to make it "approximately" the same size and position on each screen. When final art is in, we can tweak the nested-element positions on each screen to get them to line up more precisely if they look weird.
Edit: also tweaked the relative volumes of music and sound effects so that you can actually hear the sound-effects. See comments below.