- QuestSO: Add ValidateBranchCycles() DFS detection for branches[].nextQuest loop - QuestSO: Mark three legacy prerequisite fields with v2.0 removal warning in Tooltip - IQuestManager: Add QuestLockReason enum + QuestLockInfo struct (strongly-typed lock info) - IQuestManager: Add GetQuestLockInfo() method to interface; GetQuestLockReason() now delegates to it - IQuestEventSource: Add OnQuestStateChanged(questId, oldState, newState) unified event - QuestManager: Implement GetQuestLockInfo(); fire OnQuestStateChanged on all state transitions - DialogueManager: Add one-frame yield in HandleChoices before ShowChoices (skip-debounce fix) - DialogueManager: Increment _playbackId in ForceEnd() to invalidate residual choice callbacks - DialogueSequenceSO: Add UNITY_EDITOR debug log in TryGetActiveVariant on variant match - WorldStateRegistry: Add OnBatchStateChanged event + BatchMark() batch-write API - DialogueModule: List badge shows warning indicator for unconditional-shadowing variants - DialogueModule: BuildVariantsCard shows logic mode (AND/OR) alongside flag conditions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
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();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 可选排序接口。DataHubWindow 自动发现模块时按 <see cref="DisplayOrder"/> 升序排列。
|
||
/// 未实现此接口的模块默认顺序为 0,再按 DisplayName 字母序排列。
|
||
/// </summary>
|
||
public interface IDataModuleOrdered
|
||
{
|
||
/// <summary>
|
||
/// 导航侧边栏排列顺序。数值越小越靠前。
|
||
/// 建议使用 10, 20, 30… 间隔,便于插入新模块。
|
||
/// </summary>
|
||
int DisplayOrder { get; }
|
||
}
|
||
}
|