Skip to content

Commit 370d4a4

Browse files
committed
Fixed sound effect asset not setting default values when resetting.
1 parent deb2a00 commit 370d4a4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.0.2] - 2022-01-30
10+
- Fixed SoundEffect asset not setting default values when resetting.
11+
912
## [1.0.1] - 2021-12-25
1013
- Added DavidFDev folder to contain component and scriptable object in create menus.
1114

Runtime/SoundEffect.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ internal AudioClip GetClipAtRandom()
175175
return Clips[clipIndex];
176176
}
177177

178+
private void Reset()
179+
{
180+
SmartRandom = true;
181+
MinVolume = 1f;
182+
MaxVolume = 1f;
183+
MinPitch = 1f;
184+
MaxPitch = 1f;
185+
Priority = 128;
186+
}
187+
178188
#endregion
179189
}
180190
}

0 commit comments

Comments
 (0)