Skip to content

Commit ef48958

Browse files
aflycatAlianBlank
authored andcommitted
[增加]1. 播放声音功能传递的播放声音参数
1 parent c493b33 commit ef48958

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Runtime/Sound/SoundComponent.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,19 @@ public UniTask<int> PlaySoundBySerialId(string soundAssetName, string soundGroup
335335
return PlaySound(soundAssetName, soundGroupName, DefaultPriority, null, null, null, serialId);
336336
}
337337

338+
/// <summary>
339+
/// 播放声音。
340+
/// </summary>
341+
/// <param name="soundAssetName">声音资源名称。</param>
342+
/// <param name="soundGroupName">声音组名称。</param>
343+
/// <param name="playSoundParams">播放声音参数。</param>
344+
/// <param name="serialId">序列编号。</param>
345+
/// <returns>声音的序列编号。</returns>
346+
public UniTask<int> PlaySoundBySerialId(string soundAssetName, string soundGroupName, int serialId, PlaySoundParams playSoundParams)
347+
{
348+
return PlaySound(soundAssetName, soundGroupName, DefaultPriority, playSoundParams, null, null, serialId);
349+
}
350+
338351
/// <summary>
339352
/// 播放声音。
340353
/// </summary>

0 commit comments

Comments
 (0)