摄像机区域的架构改动

This commit is contained in:
2026-05-15 14:47:24 +08:00
parent 1b37297585
commit f264329751
3591 changed files with 1687228 additions and 446503 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
namespace BaseGames.Equipment
{
/// <summary>
/// 工具目录 SO。
/// 全局唯一资产Assets/Data/Equipment/ToolCatalog.asset
/// 通过 toolId 查找 ToolSO 引用。
/// 由 ToolSlotManager 在 OnLoad 时查询以恢复槽位工具引用。
/// </summary>
[CreateAssetMenu(menuName = "BaseGames/Equipment/ToolCatalog")]
public class ToolCatalogSO : ScriptableObject
{
[SerializeField] private ToolSO[] _tools;
/// <summary>按 toolId 查找工具,找不到返回 null。</summary>
public ToolSO Find(string toolId)
{
if (_tools == null || string.IsNullOrEmpty(toolId)) return null;
foreach (var tool in _tools)
if (tool != null && tool.toolId == toolId) return tool;
return null;
}
}
}