【m】10.StoryEditor [1.0.6] - 2026-01-08

### Fixed
- 处理Sample无法下载的问题
- 处理Graph选择加载器时指定程序集后不产生选项的问题
This commit is contained in:
mzh
2026-01-08 15:23:32 +08:00
parent cc3543519d
commit fb4f1f0708
10 changed files with 21 additions and 7 deletions

View File

@@ -1,6 +1,11 @@
# Changelog
此包的所有更新日志会被记录在此文件中
## [1.0.6] - 2026-01-08
### Fixed
- 处理Sample无法下载的问题
- 处理Graph选择加载器时指定程序集后不产生选项的问题
## [1.0.5] - 2026-01-06
### Changed
- 添加更新日志

View File

@@ -2,11 +2,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Cysharp.Threading.Tasks;
using Newtonsoft.Json;
using Sirenix.OdinInspector;
using Sirenix.Utilities;
using UnityEngine;
using XNode;
@@ -134,12 +132,23 @@ namespace Stary.Evo.StoryEditor
private string assembly;
private IEnumerable<string> GetAllAssemblyNames() =>
AppDomain.CurrentDomain.GetAssemblies().Select(a => a.GetName().Name).OrderBy(n => n);
/// <summary>
/// 获取继承 IResource 的所有类
/// </summary>
private HashSet<string> _iResourceTypes = AssemblyUtilities.GetTypes(AssemblyCategory.Scripts)
.Where(t => t.IsClass && typeof(IResource).IsAssignableFrom(t)).Select(t => t.ToString()).ToHashSet();
private HashSet<string> IResourceTypes
{
get
{
if (string.IsNullOrEmpty(assembly))
return new();
var asm = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(a => a.GetName().Name == assembly);
return asm == null
? new()
: asm.GetTypes().Where(t => t.IsClass && !t.IsAbstract && typeof(IResource).IsAssignableFrom(t))
.Select(t => t.Name).ToHashSet();
}
}
#else
private HashSet<string> _iResourceTypes = new();
#endif
@@ -148,7 +157,7 @@ namespace Stary.Evo.StoryEditor
/// 资源加载方式
/// </summary>
[BoxGroup("Export", centerLabel:true)]
[LabelText("资源加载方式"), ValueDropdown(nameof(_iResourceTypes)),SerializeField]
[LabelText("资源加载方式"), ValueDropdown(nameof(IResourceTypes)),SerializeField]
private string loaderType;
private IResource _loader;

View File

@@ -1,6 +1,6 @@
{
"name": "com.staryevo.storyeditor",
"version": "1.0.5",
"version": "1.0.6",
"displayName": "10.StoryEditor",
"description": "可视化剧本编辑器\n1.通过可视化图表编辑剧本内容\n2.将剧本导出为json\n3.解析剧本并执行",
"unity": "2021.3",