Files
zeling_v2/Assets/_Game/Scripts/Editor/Hub/IDataModule.cs
Joywayer bb3afd130f feat: Add SkillModule and WeaponModule for managing skills and weapons
- Implemented SkillModule to manage FormSkillSO assets with a detailed UI for editing and displaying skill properties.
- Implemented WeaponModule to manage WeaponSO assets with a detailed UI for editing and displaying weapon properties.
- Created AssetOperations class for centralized CRUD operations on ScriptableObject assets, including create, rename, delete, and clone functionalities.
- Added DetailHeader for displaying and renaming asset names in the UI.
- Introduced SoListPane for a reusable ScriptableObject list panel with search functionality and context menus.
- Added meta files for all new scripts to ensure proper asset management in Unity.
2026-05-21 07:09:53 +08:00

29 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using UnityEngine;
using UnityEngine.UIElements;
namespace BaseGames.Editor
{
/// <summary>
/// 数据模块接口 —— DataHubWindow 中每个资产管理标签页实现此接口。
/// </summary>
public interface IDataModule
{
string ModuleId { get; } // 持久化 EditorPrefs 用唯一 key
string DisplayName { get; } // 导航侧边栏显示名称
string IconName { get; } // Unity 内置图标名 or null
/// <summary>初始化模块,加载数据(首次激活时调用一次)。</summary>
void Initialize();
/// <summary>构建列表区内容onSelected 在选中资产时由模块调用。</summary>
void BuildListPane(VisualElement container, Action<UnityEngine.Object> onSelected);
/// <summary>构建详情区内容selected 为当前选中资产(可为 null。</summary>
void BuildDetailPane(VisualElement container, UnityEngine.Object selected);
/// <summary>切换到本模块时调用,可用于刷新数据。</summary>
void OnActivated();
}
}