Skip to content

Commit e9c7ce4

Browse files
committed
[修改] 适配最新的YooAsset 版本
1 parent f434122 commit e9c7ce4

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
2-
"name": "GameFrameX.Sound.Runtime",
3-
"references": [
4-
"GameFrameX.Runtime",
5-
"GameFrameX.Event.Runtime",
6-
"GameFrameX.Asset.Runtime",
7-
"GameFrameX.Entity.Runtime",
8-
"UniTask.Runtime",
9-
"YooAsset.Runtime",
10-
"GameFrameX.Scene.Runtime"
11-
],
12-
"rootNamespace": "GameFrameX.Sound.Runtime",
13-
"includePlatforms": [],
14-
"excludePlatforms": [],
15-
"allowUnsafeCode": true,
16-
"overrideReferences": false,
17-
"precompiledReferences": [],
18-
"autoReferenced": true,
19-
"defineConstraints": [],
20-
"versionDefines": [],
21-
"noEngineReferences": false
2+
"name": "GameFrameX.Sound.Runtime",
3+
"references": [
4+
"GameFrameX.Runtime",
5+
"GameFrameX.Event.Runtime",
6+
"GameFrameX.Asset.Runtime",
7+
"GameFrameX.Entity.Runtime",
8+
"UniTask.Runtime",
9+
"YooAsset.Runtime",
10+
"YooAsset",
11+
"GameFrameX.Scene.Runtime"
12+
],
13+
"rootNamespace": "GameFrameX.Sound.Runtime",
14+
"includePlatforms": [],
15+
"excludePlatforms": [],
16+
"allowUnsafeCode": true,
17+
"overrideReferences": false,
18+
"precompiledReferences": [],
19+
"autoReferenced": true,
20+
"defineConstraints": [],
21+
"versionDefines": [],
22+
"noEngineReferences": false
2223
}

Runtime/Sound/Sound/SoundManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ public async UniTask<int> PlaySound(string soundAssetName, string soundGroupName
482482
void OnAssetOperationHandleOnCompleted(AssetHandle assetHandle)
483483
{
484484
var assetObject = assetHandle.GetAssetObject<AudioClip>();
485-
LoadAssetSuccessCallback(soundAssetName, assetObject, assetHandle.Duration, PlaySoundInfo.Create(newSerialId, soundGroup, playSoundParams, userData));
485+
LoadAssetSuccessCallback(soundAssetName, assetObject, assetHandle.Duration(), PlaySoundInfo.Create(newSerialId, soundGroup, playSoundParams, userData));
486486
}
487487

488488
assetOperationHandle.Completed += OnAssetOperationHandleOnCompleted;

0 commit comments

Comments
 (0)