Files
test/Assets/PerfectWorld/Scripts/Sound/WorldMusicDatabaseSO.cs
T
2026-04-22 10:49:18 +07:00

28 lines
846 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace BrewMonster.Scripts
{
[System.Serializable]
public class WorldMusicEntry
{
[Tooltip("Matches RoleInfo.worldtag from the server (e.g. 161 for a61, 169 for a69)")]
public int worldTag;
[Tooltip("Addressable address for the BGM audio clip")]
public string bgmPath;
[Tooltip("Addressable address for the ambience audio clip")]
public string ambiencePath;
}
[CreateAssetMenu(fileName = "WorldMusicDatabase", menuName = "PerfectWorld/World Music Database")]
public class WorldMusicDatabaseSO : ScriptableObject
{
public List<WorldMusicEntry> entries = new List<WorldMusicEntry>();
public WorldMusicEntry Lookup(int worldTag)
=> entries?.Find(e => e.worldTag == worldTag);
}
}