Skip to content

Commit 28937de

Browse files
Merge pull request #2 from HansAcker/soundfix
Isolate SE's AudioSource objects from vessel.gameObject.
2 parents 3cace40 + 0d4044d commit 28937de

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Source/ShipEffectsContinued.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ void LoadSettings()
166166

167167
public bool createGroup(FXGroup group, Vessel vessel, string clip, bool loop, bool fxBypass)
168168
{
169-
group.audio = vessel.gameObject.AddComponent<AudioSource>();
169+
GameObject audioGroup = new GameObject("ShipEffects");
170+
audioGroup.transform.parent = vessel.gameObject.transform;
171+
172+
group.audio = audioGroup.AddComponent<AudioSource>();
173+
170174
group.audio.clip = GameDatabase.Instance.GetAudioClip(clip);
171175
group.audio.Stop();
172176
group.audio.loop = loop;

0 commit comments

Comments
 (0)