Skip to content

Commit 6f2428a

Browse files
committed
fix: Minor changes based on review comments.
1 parent c258871 commit 6f2428a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

VisualPinball.Unity/VisualPinball.Unity.Editor/Sound/SoundComponentInspector.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ private bool AllTargetsSupportLoopingSoundAssets()
9696

9797
protected void InfiniteLoopHelpBox(VisualElement container)
9898
{
99-
var soundAssetProp = serializedObject.FindProperty("_soundAsset");
10099
var helpBox = new HelpBox("The assigned sound asset loops, but this component " +
101100
"provides no mechanism to stop it or is not configured to do so. Either assign" +
102101
" a sound asset that does not loop or (if possible) configure this component to" +

VisualPinball.Unity/VisualPinball.Unity/Sound/SoundAsset.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ private enum SelectionMethod
7575

7676
public void ConfigureAudioSource(AudioSource audioSource, float volume = 1)
7777
{
78-
audioSource.volume = Random.Range(_volumeRange.x, _volumeRange.y);
79-
audioSource.volume *= volume;
78+
audioSource.volume = volume * Random.Range(_volumeRange.x, _volumeRange.y);
8079
audioSource.pitch = Random.Range(_pitchRange.x, _pitchRange.y);
8180
audioSource.loop = _loop;
8281
audioSource.clip = GetClip();

0 commit comments

Comments
 (0)