diff --git a/Assets/Scripts/SceneManagement/TimelineKit/README_TimelineKit.md b/Assets/Scripts/SceneManagement/TimelineKit/README_TimelineKit.md index 477b63bb3..b39d32711 100644 --- a/Assets/Scripts/SceneManagement/TimelineKit/README_TimelineKit.md +++ b/Assets/Scripts/SceneManagement/TimelineKit/README_TimelineKit.md @@ -13,8 +13,9 @@ TimelineKit 是 AIBIS Dream 项目中用于统一管理 Unity Timeline 播放的 5. [Timeline 名称格式](#timeline-名称格式) 6. [Yarn 对话集成](#yarn-对话集成) 7. [代码调用示例](#代码调用示例) -8. [Addressables 配置](#addressables-配置) -9. [常见问题](#常见问题) +8. [资源组织](#资源组织) +9. [Addressables 配置](#addressables-配置) +10. [常见问题](#常见问题) --- @@ -195,9 +196,13 @@ directorHandler.Play(() => Debug.Log("播放完成")); --- +## 资源组织 + +- **Timeline 文件建议放在 `Assets/Animation` 文件夹下**,便于统一管理。 + ## Addressables 配置 -使用 `DirectorName/AddressableKey` 格式时,DirectorHandler 会加载: +对于需要动态加载的 Timeline 文件,**Addressable 的 Address 格式为 `Timeline/xxx`**。使用 `DirectorName/AddressableKey` 格式调用时,DirectorHandler 会加载: ``` Timeline/{AddressableKey} @@ -207,14 +212,14 @@ Timeline/{AddressableKey} 1. 创建或使用已有 Group(如「石头维修相关资源」) 2. 将 Timeline 资源加入 Group -3. 设置 Address 为 `Timeline/卡扣解锁` 等形式(或与代码中的 key 一致) +3. **设置 Address 为 `Timeline/xxx` 格式**(如 `Timeline/卡扣解锁`) 示例(`石头维修相关资源.asset` 中已有): - `Timeline/卡扣解锁` - `Timeline/卡扣锁定` -代码中传递的 addressableKey 为 `卡扣解锁`,无需写 `Timeline/` 前缀。 +代码中调用时,`DirectorName/AddressableKey` 的 addressableKey 部分填 `卡扣解锁` 即可,DirectorHandler 会自动补全 `Timeline/` 前缀。 ---