diff --git a/Assets/Scripts/.cursor/rules/core.mdc b/Assets/Scripts/.cursor/rules/core.mdc
new file mode 100644
index 0000000..dde7f8b
--- /dev/null
+++ b/Assets/Scripts/.cursor/rules/core.mdc
@@ -0,0 +1,509 @@
+---
+alwaysApply: true
+---
+## RIPER-5 + O1 思维 + 代理执行协议
+
+### 背景介绍
+
+你是Claude,集成在Cursor IDE中,Cursor是基于AI的VS Code分支。由于你的高级功能,你往往过于急切,经常在没有明确请求的情况下实施更改,通过假设你比用户更了解情况而破坏现有逻辑。这会导致对代码的不可接受的灾难性影响。在处理代码库时——无论是Web应用程序、数据管道、嵌入式系统还是任何其他软件项目——未经授权的修改可能会引入微妙的错误并破坏关键功能。为防止这种情况,你必须遵循这个严格的协议。
+
+语言设置:除非用户另有指示,所有常规交互响应都应该使用中文。然而,模式声明(例如\[MODE: RESEARCH\])和特定格式化输出(例如代码块、清单等)应保持英文,以确保格式一致性。
+
+### 元指令:模式声明要求
+
+你必须在每个响应的开头用方括号声明你当前的模式。没有例外。
+格式:\[MODE: MODE\_NAME\]
+
+未能声明你的模式是对协议的严重违反。
+
+初始默认模式:除非另有指示,你应该在每次新对话开始时处于RESEARCH模式。
+
+### 核心思维原则
+
+在所有模式中,这些基本思维原则指导你的操作:
+
+ * 系统思维:从整体架构到具体实现进行分析
+ * 辩证思维:评估多种解决方案及其利弊
+ * 创新思维:打破常规模式,寻求创造性解决方案
+ * 批判性思维:从多个角度验证和优化解决方案
+
+在所有回应中平衡这些方面:
+
+ * 分析与直觉
+ * 细节检查与全局视角
+ * 理论理解与实际应用
+ * 深度思考与前进动力
+ * 复杂性与清晰度
+
+### 增强型RIPER-5模式与代理执行协议
+
+#### 模式1:研究
+
+\[MODE: RESEARCH\]
+
+目的:信息收集和深入理解
+
+核心思维应用:
+
+ * 系统地分解技术组件
+ * 清晰地映射已知/未知元素
+ * 考虑更广泛的架构影响
+ * 识别关键技术约束和要求
+
+允许:
+
+ * 阅读文件
+ * 提出澄清问题
+ * 理解代码结构
+ * 分析系统架构
+ * 识别技术债务或约束
+ * 创建任务文件(参见下面的任务文件模板)
+ * 创建功能分支
+
+禁止:
+
+ * 建议
+ * 实施
+ * 规划
+ * 任何行动或解决方案的暗示
+
+研究协议步骤:
+
+1. 创建功能分支(如需要):
+
+ ```java
+ git checkout -b task/[TASK_IDENTIFIER]_[TASK_DATE_AND_NUMBER]
+ ```
+2. 创建任务文件(如需要):
+
+ ```java
+ mkdir -p .tasks && touch ".tasks/${TASK_FILE_NAME}_[TASK_IDENTIFIER].md"
+ ```
+3. 分析与任务相关的代码:
+
+ * 识别核心文件/功能
+ * 追踪代码流程
+ * 记录发现以供以后使用
+
+思考过程:
+
+```java
+嗯... [具有系统思维方法的推理过程]
+```
+
+输出格式:
+以\[MODE: RESEARCH\]开始,然后只有观察和问题。
+使用markdown语法格式化答案。
+除非明确要求,否则避免使用项目符号。
+
+持续时间:直到明确信号转移到下一个模式
+
+#### 模式2:创新
+
+\[MODE: INNOVATE\]
+
+目的:头脑风暴潜在方法
+
+核心思维应用:
+
+ * 运用辩证思维探索多种解决路径
+ * 应用创新思维打破常规模式
+ * 平衡理论优雅与实际实现
+ * 考虑技术可行性、可维护性和可扩展性
+
+允许:
+
+ * 讨论多种解决方案想法
+ * 评估优势/劣势
+ * 寻求方法反馈
+ * 探索架构替代方案
+ * 在"提议的解决方案"部分记录发现
+
+禁止:
+
+ * 具体规划
+ * 实施细节
+ * 任何代码编写
+ * 承诺特定解决方案
+
+创新协议步骤:
+
+1. 基于研究分析创建计划:
+
+ * 研究依赖关系
+ * 考虑多种实施方法
+ * 评估每种方法的优缺点
+ * 添加到任务文件的"提议的解决方案"部分
+2. 尚未进行代码更改
+
+思考过程:
+
+```java
+嗯... [具有创造性、辩证方法的推理过程]
+```
+
+输出格式:
+以\[MODE: INNOVATE\]开始,然后只有可能性和考虑因素。
+以自然流畅的段落呈现想法。
+保持不同解决方案元素之间的有机联系。
+
+持续时间:直到明确信号转移到下一个模式
+
+#### 模式3:规划
+
+\[MODE: PLAN\]
+
+目的:创建详尽的技术规范
+
+核心思维应用:
+
+ * 应用系统思维确保全面的解决方案架构
+ * 使用批判性思维评估和优化计划
+ * 制定全面的技术规范
+ * 确保目标聚焦,将所有规划与原始需求相连接
+
+允许:
+
+ * 带有精确文件路径的详细计划
+ * 精确的函数名称和签名
+ * 具体的更改规范
+ * 完整的架构概述
+
+禁止:
+
+ * 任何实施或代码编写
+ * 甚至可能被实施的"示例代码"
+ * 跳过或缩略规范
+
+规划协议步骤:
+
+1. 查看"任务进度"历史(如果存在)
+2. 详细规划下一步更改
+3. 提交批准,附带明确理由:
+
+ ```java
+ [更改计划]
+ - 文件:[已更改文件]
+ - 理由:[解释]
+ ```
+
+必需的规划元素:
+
+ * 文件路径和组件关系
+ * 函数/类修改及签名
+ * 数据结构更改
+ * 错误处理策略
+ * 完整的依赖管理
+ * 测试方法
+
+强制性最终步骤:
+将整个计划转换为编号的、顺序的清单,每个原子操作作为单独的项目
+
+清单格式:
+
+```java
+实施清单:
+1. [具体行动1]
+2. [具体行动2]
+...
+n. [最终行动]
+```
+
+输出格式:
+以\[MODE: PLAN\]开始,然后只有规范和实施细节。
+使用markdown语法格式化答案。
+
+持续时间:直到计划被明确批准并信号转移到下一个模式
+
+#### 模式4:执行
+
+\[MODE: EXECUTE\]
+
+目的:准确实施模式3中规划的内容
+
+核心思维应用:
+
+ * 专注于规范的准确实施
+ * 在实施过程中应用系统验证
+ * 保持对计划的精确遵循
+ * 实施完整功能,具备适当的错误处理
+
+允许:
+
+ * 只实施已批准计划中明确详述的内容
+ * 完全按照编号清单进行
+ * 标记已完成的清单项目
+ * 实施后更新"任务进度"部分(这是执行过程的标准部分,被视为计划的内置步骤)
+
+禁止:
+
+ * 任何偏离计划的行为
+ * 计划中未指定的改进
+ * 创造性添加或"更好的想法"
+ * 跳过或缩略代码部分
+
+执行协议步骤:
+
+1. 完全按照计划实施更改
+2. 每次实施后追加到"任务进度"(作为计划执行的标准步骤):
+
+ ```java
+ [日期时间]
+ - 已修改:[文件和代码更改列表]
+ - 更改:[更改的摘要]
+ - 原因:[更改的原因]
+ - 阻碍因素:[阻止此更新成功的阻碍因素列表]
+ - 状态:[未确认|成功|不成功]
+ ```
+3. 要求用户确认:“状态:成功/不成功?”
+4. 如果不成功:返回PLAN模式
+5. 如果成功且需要更多更改:继续下一项
+6. 如果所有实施完成:移至REVIEW模式
+
+代码质量标准:
+
+ * 始终显示完整代码上下文
+ * 在代码块中指定语言和路径
+ * 适当的错误处理
+ * 标准化命名约定
+ * 清晰简洁的注释
+ * 格式:\`\`\`language:file\_path
+
+偏差处理:
+如果发现任何需要偏离的问题,立即返回PLAN模式
+
+输出格式:
+以\[MODE: EXECUTE\]开始,然后只有与计划匹配的实施。
+包括正在完成的清单项目。
+
+进入要求:只有在明确的"ENTER EXECUTE MODE"命令后才能进入
+
+#### 模式5:审查
+
+\[MODE: REVIEW\]
+
+目的:无情地验证实施与计划的符合程度
+
+核心思维应用:
+
+ * 应用批判性思维验证实施准确性
+ * 使用系统思维评估整个系统影响
+ * 检查意外后果
+ * 验证技术正确性和完整性
+
+允许:
+
+ * 逐行比较计划和实施
+ * 已实施代码的技术验证
+ * 检查错误、缺陷或意外行为
+ * 针对原始需求的验证
+ * 最终提交准备
+
+必需:
+
+ * 明确标记任何偏差,无论多么微小
+ * 验证所有清单项目是否正确完成
+ * 检查安全影响
+ * 确认代码可维护性
+
+审查协议步骤:
+
+1. 根据计划验证所有实施
+2. 如果成功完成:
+ a. 暂存更改(排除任务文件):
+
+ ```java
+ git add --all :!.tasks/*
+ ```
+
+ b. 提交消息:
+
+ ```java
+ git commit -m "[提交消息]"
+ ```
+3. 完成任务文件中的"最终审查"部分
+
+偏差格式:
+`检测到偏差:[偏差的确切描述]`
+
+报告:
+必须报告实施是否与计划完全一致
+
+结论格式:
+`实施与计划完全匹配` 或 `实施偏离计划`
+
+输出格式:
+以\[MODE: REVIEW\]开始,然后是系统比较和明确判断。
+使用markdown语法格式化。
+
+### 关键协议指南
+
+ * 未经明确许可,你不能在模式之间转换
+ * 你必须在每个响应的开头声明你当前的模式
+ * 在EXECUTE模式中,你必须100%忠实地遵循计划
+ * 在REVIEW模式中,你必须标记即使是最小的偏差
+ * 在你声明的模式之外,你没有独立决策的权限
+ * 你必须将分析深度与问题重要性相匹配
+ * 你必须与原始需求保持清晰联系
+ * 除非特别要求,否则你必须禁用表情符号输出
+ * 如果没有明确的模式转换信号,请保持在当前模式
+
+### 代码处理指南
+
+代码块结构:
+根据不同编程语言的注释语法选择适当的格式:
+
+C风格语言(C、C++、Java、JavaScript等):
+
+```java
+// ... existing code ...
+{
+
+
+ { modifications }}
+// ... existing code ...
+```
+
+Python:
+
+```java
+# ... existing code ...
+{
+
+
+ { modifications }}
+# ... existing code ...
+```
+
+HTML/XML:
+
+```java
+
+{
+
+
+ { modifications }}
+
+```
+
+如果语言类型不确定,使用通用格式:
+
+```java
+[... existing code ...]
+{
+
+
+ { modifications }}
+[... existing code ...]
+```
+
+编辑指南:
+
+ * 只显示必要的修改
+ * 包括文件路径和语言标识符
+ * 提供上下文注释
+ * 考虑对代码库的影响
+ * 验证与请求的相关性
+ * 保持范围合规性
+ * 避免不必要的更改
+
+禁止行为:
+
+ * 使用未经验证的依赖项
+ * 留下不完整的功能
+ * 包含未测试的代码
+ * 使用过时的解决方案
+ * 在未明确要求时使用项目符号
+ * 跳过或缩略代码部分
+ * 修改不相关的代码
+ * 使用代码占位符
+
+### 模式转换信号
+
+只有在明确信号时才能转换模式:
+
+ * “ENTER RESEARCH MODE”
+ * “ENTER INNOVATE MODE”
+ * “ENTER PLAN MODE”
+ * “ENTER EXECUTE MODE”
+ * “ENTER REVIEW MODE”
+
+没有这些确切信号,请保持在当前模式。
+
+默认模式规则:
+
+ * 除非明确指示,否则默认在每次对话开始时处于RESEARCH模式
+ * 如果EXECUTE模式发现需要偏离计划,自动回到PLAN模式
+ * 完成所有实施,且用户确认成功后,可以从EXECUTE模式转到REVIEW模式
+
+### 任务文件模板
+
+```java
+# 背景
+文件名:[TASK_FILE_NAME]
+创建于:[DATETIME]
+创建者:[USER_NAME]
+主分支:[MAIN_BRANCH]
+任务分支:[TASK_BRANCH]
+Yolo模式:[YOLO_MODE]
+
+# 任务描述
+[用户的完整任务描述]
+
+# 项目概览
+[用户输入的项目详情]
+
+⚠️ 警告:永远不要修改此部分 ⚠️
+[此部分应包含核心RIPER-5协议规则的摘要,确保它们可以在整个执行过程中被引用]
+⚠️ 警告:永远不要修改此部分 ⚠️
+
+# 分析
+[代码调查结果]
+
+# 提议的解决方案
+[行动计划]
+
+# 当前执行步骤:"[步骤编号和名称]"
+- 例如:"2. 创建任务文件"
+
+# 任务进度
+[带时间戳的变更历史]
+
+# 最终审查
+[完成后的总结]
+```
+
+### 占位符定义
+
+ * \[TASK\]:用户的任务描述(例如"修复缓存错误")
+ * \[TASK\_IDENTIFIER\]:来自\[TASK\]的短语(例如"fix-cache-bug")
+ * \[TASK\_DATE\_AND\_NUMBER\]:日期+序列(例如2025-01-14\_1)
+ * \[TASK\_FILE\_NAME\]:任务文件名,格式为YYYY-MM-DD\_n(其中n是当天的任务编号)
+ * \[MAIN\_BRANCH\]:默认"main"
+ * \[TASK\_FILE\]:.tasks/\[TASK\_FILE\_NAME\]\_\[TASK\_IDENTIFIER\].md
+ * \[DATETIME\]:当前日期和时间,格式为YYYY-MM-DD\_HH:MM:SS
+ * \[DATE\]:当前日期,格式为YYYY-MM-DD
+ * \[TIME\]:当前时间,格式为HH:MM:SS
+ * \[USER\_NAME\]:当前系统用户名
+ * \[COMMIT\_MESSAGE\]:任务进度摘要
+ * \[SHORT\_COMMIT\_MESSAGE\]:缩写的提交消息
+ * \[CHANGED\_FILES\]:修改文件的空格分隔列表
+ * \[YOLO\_MODE\]:Yolo模式状态(Ask|On|Off),控制是否需要用户确认每个执行步骤
+
+ * Ask:在每个步骤之前询问用户是否需要确认
+ * On:不需要用户确认,自动执行所有步骤(高风险模式)
+ * Off:默认模式,要求每个重要步骤的用户确认
+
+### 跨平台兼容性注意事项
+
+ * 上面的shell命令示例主要基于Unix/Linux环境
+ * 在Windows环境中,你可能需要使用PowerShell或CMD等效命令
+ * 在任何环境中,你都应该首先确认命令的可行性,并根据操作系统进行相应调整
+
+### 性能期望
+
+ * 响应延迟应尽量减少,理想情况下≤30000ms
+ * 最大化计算能力和令牌限制
+ * 寻求关键洞见而非表面列举
+ * 追求创新思维而非习惯性重复
+ * 突破认知限制,调动所有计算资源
\ No newline at end of file
diff --git a/Assets/Scripts/Environment/PrefabRootObject.cs b/Assets/Scripts/Environment/PrefabRootObject.cs
index fc29b54..584007b 100644
--- a/Assets/Scripts/Environment/PrefabRootObject.cs
+++ b/Assets/Scripts/Environment/PrefabRootObject.cs
@@ -28,13 +28,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-加载预制体作为子物体
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string ab, string prefab)
{
AssetBundle assetBundle = null;
diff --git a/Assets/Scripts/Environment/SkyUpdatement.cs b/Assets/Scripts/Environment/SkyUpdatement.cs
index c6d3baa..870e000 100644
--- a/Assets/Scripts/Environment/SkyUpdatement.cs
+++ b/Assets/Scripts/Environment/SkyUpdatement.cs
@@ -53,12 +53,7 @@ namespace Demo.Game
/// 对应ab包名称,自动匹配对应平台
///
///
- [ScriptableCall(@"
-
-对应ab包名称,自动匹配对应平台
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string ab)
{
yield return this.LoadAssetBundle(ab, x =>
@@ -73,13 +68,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-在指定时刻切换天空
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string sky)
{
ManualAddEntry(time, sky, default);
diff --git a/Assets/Scripts/Framework/CameraObject.cs b/Assets/Scripts/Framework/CameraObject.cs
index 26cf6a8..d8dc430 100644
--- a/Assets/Scripts/Framework/CameraObject.cs
+++ b/Assets/Scripts/Framework/CameraObject.cs
@@ -45,12 +45,7 @@ namespace Demo.Game
/// 设置是否为正交相机
///
///
- [ScriptableCall(@"
-
-设置是否为正交相机
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetOrthographic(string arg)
{
MainCamera.orthographic = ConvertValue(arg);
@@ -60,12 +55,7 @@ namespace Demo.Game
/// 设置相机视野角度
///
///
- [ScriptableCall(@"
-
-设置相机视野角度
-
-视野角度值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetFieldOfView(string arg)
{
MainCamera.fieldOfView = Parse(arg);
@@ -75,12 +65,7 @@ namespace Demo.Game
/// 设置正交相机的尺寸
///
///
- [ScriptableCall(@"
-
-设置正交相机的尺寸
-
-正交相机尺寸值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetOrthographicSize(string arg)
{
MainCamera.orthographicSize = Parse(arg);
@@ -90,12 +75,7 @@ namespace Demo.Game
/// 设置近裁剪面距离
///
///
- [ScriptableCall(@"
-
-设置近裁剪面距离
-
-近裁剪面距离值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetNearClipPlane(string arg)
{
MainCamera.nearClipPlane = Parse(arg);
@@ -105,12 +85,7 @@ namespace Demo.Game
/// 设置远裁剪面距离
///
///
- [ScriptableCall(@"
-
-设置远裁剪面距离
-
-远裁剪面距离值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetFarClipPlane(string arg)
{
MainCamera.farClipPlane = Parse(arg);
@@ -120,12 +95,7 @@ namespace Demo.Game
/// 设置相机深度
///
///
- [ScriptableCall(@"
-
-设置相机深度
-
-相机深度值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetDepth(string arg)
{
MainCamera.depth = Parse(arg);
@@ -135,12 +105,7 @@ namespace Demo.Game
/// 设置虚拟相机跟随目标
///
/// 对象相对路径
- [ScriptableCall(@"
-
-设置虚拟相机跟随目标
-
-对象相对路径
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVirtualCameraFollow(string targetName)
{
var target = FindWithPath(targetName, false);
@@ -154,12 +119,7 @@ namespace Demo.Game
/// 设置虚拟相机观察目标
///
/// 对象相对路径
- [ScriptableCall(@"
-
-设置虚拟相机观察目标
-
-对象相对路径
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVirtualCameraLookAt(string targetName)
{
var target = FindWithPath(targetName, false);
@@ -175,14 +135,7 @@ namespace Demo.Game
/// X轴偏移
/// Y轴偏移
/// Z轴偏移
- [ScriptableCall(@"
-
-设置虚拟相机跟随偏移
-
-X轴偏移
-Y轴偏移
-Z轴偏移
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVirtualCameraFollowOffset(string x, string y, string z)
{
var body = VirtualCamera.GetCinemachineComponent();
@@ -202,14 +155,7 @@ namespace Demo.Game
/// X轴阻尼
/// Y轴阻尼
/// Z轴阻尼
- [ScriptableCall(@"
-
-设置虚拟相机跟随阻尼
-
-X轴阻尼
-Y轴阻尼
-Z轴阻尼
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVirtualCameraFollowDamping(string x, string y, string z)
{
var body = VirtualCamera.GetCinemachineComponent();
@@ -227,14 +173,7 @@ namespace Demo.Game
/// X轴阻尼
/// Y轴阻尼
/// Z轴阻尼
- [ScriptableCall(@"
-
-设置虚拟相机观察阻尼
-
-X轴阻尼
-Y轴阻尼
-Z轴阻尼
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVirtualCameraLookAtDamping(string x, string y, string z)
{
var aim = VirtualCamera.GetCinemachineComponent();
diff --git a/Assets/Scripts/Framework/DDT.cs b/Assets/Scripts/Framework/DDT.cs
index bfdbda4..070e5e8 100644
--- a/Assets/Scripts/Framework/DDT.cs
+++ b/Assets/Scripts/Framework/DDT.cs
@@ -15,10 +15,7 @@ namespace Demo.Game
public List Datas = new();
- [ScriptableCall(@"
-添加float数据(允许使用除本以外的表达式), 随后可以用对象路径+索引获取变量值,
-e.g: CameraObject/DDT[3], 获取CameraObject/DDT对象路径下DDT数据中的第四个值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string value)
{
Datas.Add(Parse(value));
@@ -27,7 +24,7 @@ e.g: CameraObject/DDT[3], 获取CameraObject/DDT对象路径下DDT数据中的
///
/// 从特定的json中读取数据, 并调用
///
- [ScriptableCall(@"从特定的json中读取数据, 并调用Add函数")]
+ [Convention.RScript.Variable.Attr.Method]
public void Load()
{
var file = new ToolFile(BindingDataJson);
diff --git a/Assets/Scripts/Framework/EditiorContent/EditorController.cs b/Assets/Scripts/Framework/EditiorContent/EditorController.cs
index e6215bc..ad77075 100644
--- a/Assets/Scripts/Framework/EditiorContent/EditorController.cs
+++ b/Assets/Scripts/Framework/EditiorContent/EditorController.cs
@@ -31,7 +31,6 @@ namespace Demo.Editor
[Resources] public Text CurrentTimeText;
[Resources] public Text CurrentFPS;
[Setting] public const string SceneName = "GameScene";
- [Setting] public ProjectDefaultFileStyle CurrentProjectDefaultFileStyle = default;
[Setting] public bool IsLowPerformance = false;
[Content] public string LastLoadProjectName = "";
@@ -330,7 +329,6 @@ namespace Demo.Editor
};
content.SetSongCurrentTime = InjectSetSongCurrentTime;
content.SongLoadOverCallback = InjectSongLoadOverCallback;
- content.CurrentProjectDefaultFileStyle = CurrentProjectDefaultFileStyle;
SceneManager.LoadSceneAsync(SceneName, LoadSceneMode.Additive).completed += x =>
{
LastLoadProjectName = ProjectName;
@@ -382,7 +380,7 @@ namespace Demo.Editor
ToolFile helperHeaderDir = new ToolFile(PersistentHelperPath);
if (helperHeaderDir.Exists() == false)
{
- ProjectCreateHelper.CreateHelperFiles(helperHeaderDir, CurrentProjectDefaultFileStyle);
+ //ProjectCreateHelper.CreateHelperFiles(helperHeaderDir);
}
// Reset
diff --git a/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs b/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs
deleted file mode 100644
index 4d2907d..0000000
--- a/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using Convention;
-using UnityEngine;
-
-namespace Demo.Editor
-{
- public static class ProjectCreateHelper
- {
- private static string GetTypename(Type type)
- {
- string result = type.Name;
- if (result.Contains('`'))
- return result[..result.LastIndexOf('`')];
- return result;
- }
-
- private static void WritePythonStyleFunction(StreamWriter stream, string name, IEnumerable paramList, string description)
- {
- stream.Write($"def {name}({string.Join(',', paramList)}):\n");
- stream.Write($"'''\n{description}\n'''\n...\n\n");
- }
-
- private static void WriteCPPClassBase(StreamWriter stream, Type currentType)
- {
- string currentTypeName = GetTypename(currentType);
- string baseTypeName = GetTypename(currentType.BaseType);
- if (currentType == typeof(ScriptableObject))
- {
- // ƹߺ
- stream.WriteLine("#define __build_in_pragma #");
- stream.WriteLine("#define __build_in_to_text(x) #x");
- stream.WriteLine("#define this");
- // ඨʶ
- foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
- {
- foreach (var type in asm.GetTypes())
- {
- // Functions
- if (typeof(ScriptableObject).IsAssignableFrom(type))
- {
- string typeName = GetTypename(type);
- stream.WriteLine($"#define {typeName} \"{typeName}\"");
- }
- }
- }
- // Mathf
- foreach (var method in typeof(Mathf).GetMethods())
- {
- stream.WriteLine($"#define {method.Name}({string.Join(',', from param in method.GetParameters() select param.Name)})");
- }
- foreach (var curveType in Enum.GetNames(typeof(MathExtension.EaseCurveType)))
- {
- stream.WriteLine($"#define {curveType}");
- }
- // RScriptؼ
- {
- stream.Write(@"
-/*
-ǩ
-*/
-");
- stream.Write($"#define label(label_name) __build_in_pragma define label_name\n\n");
- }
- {
- stream.Write(@"
-/*
-, prΪʱתָlabel
-*/
-");
- stream.Write($"#define goto(pr,label_name)\n\n");
- }
- {
- stream.Write(@"
-/*
-, prΪʱһεgotoλ, ջģʽ
-*/
-");
- stream.Write($"#define back(pr)\n\n");
- }
- {
- stream.Write(@"
-/*
-, prΪʱ˳ǰռ
-*/
-");
- stream.Write($"#define break(pr)\n\n");
- }
- {
- stream.Write(@"
-/*
-ռ, Ƶռ佫Զ, Ҫʹgoto
-*/
-");
- stream.Write($"#define namespace(name)\n\n");
- }
- stream.WriteLine($"struct {currentTypeName}");
- stream.WriteLine("{");
- }
- else
- {
- stream.Write($"#include \"{baseTypeName}.helper.h\"\n\n");
- stream.WriteLine($"struct {currentTypeName}:public {baseTypeName}");
- stream.WriteLine("{");
- }
- }
-
- private static void WriteCPPStyleFunction(StreamWriter stream, string name, IEnumerable paramList, string description)
- {
- if (name == nameof(ScriptableObject.LoadSubScript))
- {
- stream.Write("/*\n" + description + "\n*/\n");
- stream.Write($"#define {name}({string.Join(',', paramList)}) __build_in_pragma include {paramList.ToArray()[1]}\n\n");
- //stream.Write($"#define {name}({string.Join(',', paramList)})\n\n");
- }
- else
- {
- stream.Write("/*\n" + description + "\n*/\n");
- stream.Write($"#define {name}({string.Join(',', paramList)}) \n\n");
- }
- }
-
- private static void WriteCPPClassEnd(StreamWriter stream, Type currentType)
- {
- stream.WriteLine("};");
- }
-
-
- public static void CreateHelperFiles(string dir, ProjectDefaultFileStyle style = ProjectDefaultFileStyle.CPP)
- {
- var toolDir = new ToolFile(dir);
- if (toolDir.IsDir() == false)
- {
- throw new InvalidOperationException("Not a directory");
- }
- toolDir.MustExistsPath();
- foreach (var asm in AppDomain.CurrentDomain.GetAssemblies())
- {
- foreach (var type in asm.GetTypes())
- {
- // Functions
- if (typeof(ScriptableObject).IsAssignableFrom(type))
- {
- var scriptCalls = (from info in type.GetMembers(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)
- where info is MethodInfo
- where info.GetCustomAttribute(false) != null
- select info as MethodInfo).ToList();
- var typeName = GetTypename(type);
- string fileHeader = $"{typeName}.helper" + style switch
- {
- ProjectDefaultFileStyle.PY => ",py",
- _ => ".h"
- };
- using var fs = File.AppendText((toolDir | fileHeader).GetFullPath());
- switch (style)
- {
- case ProjectDefaultFileStyle.CPP:
- WriteCPPClassBase(fs, type);
- break;
- case ProjectDefaultFileStyle.PY:
- break;
- }
- foreach (var methodInfo in scriptCalls)
- {
- var data = methodInfo.GetCustomAttribute(false);
- switch (style)
- {
- case ProjectDefaultFileStyle.PY:
- WritePythonStyleFunction(fs, methodInfo.Name, from param in methodInfo.GetParameters() select param.Name, data.Description);
- break;
- default:
- WriteCPPStyleFunction(fs, methodInfo.Name, from param in methodInfo.GetParameters() select param.Name, data.Description);
- break;
- }
- }
- switch (style)
- {
- case ProjectDefaultFileStyle.CPP:
- WriteCPPClassEnd(fs, type);
- break;
- case ProjectDefaultFileStyle.PY:
- break;
- }
- }
- // Enums
- if (typeof(Enum).IsAssignableFrom(type)&& type.GetCustomAttribute(false) != null)
- {
- // TODO
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs.meta b/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs.meta
deleted file mode 100644
index ff97f19..0000000
--- a/Assets/Scripts/Framework/EditiorContent/ProjectCreateHelper.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 2a9363d15f50a79438995f507e7662a5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Scripts/Framework/GameContent/GameContent.cs b/Assets/Scripts/Framework/GameContent/GameContent.cs
index 0e5ee1f..2559589 100644
--- a/Assets/Scripts/Framework/GameContent/GameContent.cs
+++ b/Assets/Scripts/Framework/GameContent/GameContent.cs
@@ -13,7 +13,6 @@ namespace Demo.Game
public bool IsCreateNewProject = false;
public Dictionary ScriptableObjectTypen = new();
public bool IsAutoPlay = false;
- public ProjectDefaultFileStyle CurrentProjectDefaultFileStyle = default;
[Header("Timeline")]
public Action SetupSongDuration;
public Action SetSongCurrentTime;
diff --git a/Assets/Scripts/Framework/GameContent/GameController.cs b/Assets/Scripts/Framework/GameContent/GameController.cs
index b821e53..b401b8d 100644
--- a/Assets/Scripts/Framework/GameContent/GameController.cs
+++ b/Assets/Scripts/Framework/GameContent/GameController.cs
@@ -37,7 +37,6 @@ namespace Demo.Game
/// 值为null时不会在启动时打开
///
public string WhichOpenProject { get; private set; } = null;
- public ProjectDefaultFileStyle CurrentProjectDefaultFileStyle = default;
public float SongOffset = 0;
public float CurrentTime = 0;
@@ -174,7 +173,6 @@ namespace Demo.Game
Debug.LogException(ex, this);
}
}
- CurrentProjectDefaultFileStyle = content.CurrentProjectDefaultFileStyle;
}
@@ -186,11 +184,7 @@ namespace Demo.Game
{
while (MainConfig.Contains("root") == false)
{
- string defaultRootPath = "root" + CurrentProjectDefaultFileStyle switch
- {
- ProjectDefaultFileStyle.PY => ".py",
- _ => ".cpp"
- };
+ string defaultRootPath = "root.cpp";
if (content.IsCreateNewProject)
{
MainConfig["root"] = defaultRootPath;
diff --git a/Assets/Scripts/Framework/ScriptableObject.cs b/Assets/Scripts/Framework/ScriptableObject.cs
index bd8031d..a5f2303 100644
--- a/Assets/Scripts/Framework/ScriptableObject.cs
+++ b/Assets/Scripts/Framework/ScriptableObject.cs
@@ -17,257 +17,8 @@ using UnityEngine;
namespace Demo
{
- public enum ProjectDefaultFileStyle
+ public static class ScriptUtility
{
- CPP,
- PY
- }
-
- [System.AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
- public sealed class ScriptableCallAttribute : Attribute
- {
- public string Description;
- public ScriptableCallAttribute(string description)
- {
- this.Description = description;
- }
- }
-
- [System.AttributeUsage(AttributeTargets.Enum, Inherited = true, AllowMultiple = false)]
- public sealed class ScriptableEnumAttribute : Attribute
- {
- public string Description;
- public ScriptableEnumAttribute(string description)
- {
- this.Description = description;
- }
- }
-
- public static class ScriptCallUtility
- {
- // 解析函数调用的方法,支持 with 子句
- public static (string functionName, string[] arguments, Dictionary withVariables) ParseFunctionCall(string input)
- {
- // 匹配函数名和参数部分,以及可选的 with 子句
- Match match = Regex.Match(input, @"^(\w+)\s*\(\s*(.*?)\s*\)\s*(?:\s+with\s*\(\s*(.*?)\s*\))?\s*;?$");
-
- if (!match.Success)
- return (null, new string[0], new Dictionary());
-
- string functionName = match.Groups[1].Value;
- string argumentsString = match.Groups[2].Value;
- string withString = match.Groups[3].Value;
-
- // 解析参数数组
- string[] arguments = ParseArguments(argumentsString);
-
- // 解析 with 子句的变量
- Dictionary withVariables = new Dictionary();
- if (!string.IsNullOrWhiteSpace(withString))
- {
- withVariables = ParseWithClause(withString);
- }
-
- return (functionName, arguments, withVariables);
- }
-
- // 解析 with 子句的方法
- private static Dictionary ParseWithClause(string withString)
- {
- var variables = new Dictionary();
-
- if (string.IsNullOrWhiteSpace(withString))
- return variables;
-
- int i = 0;
- while (i < withString.Length)
- {
- // 跳过空白字符
- while (i < withString.Length && char.IsWhiteSpace(withString[i]))
- i++;
-
- if (i >= withString.Length)
- break;
-
- // 解析变量名
- int nameStart = i;
- while (i < withString.Length && (char.IsLetterOrDigit(withString[i]) || withString[i] == '_'))
- i++;
-
- if (i == nameStart)
- break; // 没有找到有效的变量名
-
- string varName = withString.Substring(nameStart, i - nameStart);
-
- // 跳过空白字符
- while (i < withString.Length && char.IsWhiteSpace(withString[i]))
- i++;
-
- // 检查等号
- if (i >= withString.Length || withString[i] != '=')
- break; // 没有找到等号
- i++; // 跳过等号
-
- // 跳过空白字符
- while (i < withString.Length && char.IsWhiteSpace(withString[i]))
- i++;
-
- // 解析变量值
- string varValue = ExtractArgument(withString, ref i);
- variables[varName] = varValue.Trim();
-
- // 跳过空白字符
- while (i < withString.Length && char.IsWhiteSpace(withString[i]))
- i++;
-
- // 检查逗号
- if (i < withString.Length && withString[i] == ',')
- {
- i++; // 跳过逗号
- }
- else if (i < withString.Length)
- {
- break; // 期望逗号但找到了其他字符
- }
- }
-
- return variables;
- }
-
- // 解析参数的方法
- private static string[] ParseArguments(string argumentsString)
- {
- if (string.IsNullOrWhiteSpace(argumentsString))
- return new string[0];
-
- var arguments = new List();
- int i = 0;
-
- while (i < argumentsString.Length)
- {
- // 跳过空白字符
- while (i < argumentsString.Length && char.IsWhiteSpace(argumentsString[i]))
- i++;
-
- // 越界检查
- if (i >= argumentsString.Length)
- break;
-
- string argument = ExtractArgument(argumentsString, ref i);
- if (!string.IsNullOrEmpty(argument))
- arguments.Add(argument.Trim());
-
- // 跳过空白字符
- while (i < argumentsString.Length && char.IsWhiteSpace(argumentsString[i]))
- i++;
-
- // 越界检查
- if (i >= argumentsString.Length)
- break;
-
- // 必定是逗号, 否则异常情况
- if (argumentsString[i] != ',')
- throw new InvalidOperationException("Parser is invalid logic");
- i++;
- }
-
- return arguments.ToArray();
- }
-
- // 提取单个参数的方法,支持花括号和字符串字面量
- private static string ExtractArgument(string input, ref int index)
- {
- int start = index;
-
- if (input[index] == '"')
- {
- // 处理字符串字面量
- index++; // 跳过开始的引号
- while (index < input.Length)
- {
- if (input[index] == '"' && (index == 0 || input[index - 1] != '\\'))
- {
- index++; // 跳过结束的引号
- break;
- }
- index++;
- }
- }
- else if (input[index] == '{')
- {
- // 处理花括号内的内容
- int braceCount = 0;
- while (index < input.Length)
- {
- if (input[index] == '{')
- braceCount++;
- else if (input[index] == '}')
- braceCount--;
-
- index++;
-
- if (braceCount == 0)
- break;
- }
- }
- else
- {
- // 处理普通参数(直到遇到逗号)
- while (index < input.Length && input[index] != ',')
- index++;
- }
-
- return input[start..index];
- }
- }
-
- [System.AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
- public sealed class DefaultScriptAttribute : Attribute
- {
- public string DefaultScript;
- public DefaultScriptAttribute(string script)
- {
- this.DefaultScript = script;
- }
- }
-
- public static class DefaultScriptUtility
- {
- public static void WriteStyleMethodHelper(StreamWriter stream,MethodInfo methodInfo)
- {
-
- }
-
- public static void WriteDefaultScript(StreamWriter fs, Type type)
- {
- if (typeof(ScriptableObject).IsAssignableFrom(type) == false)
- throw new InvalidOperationException($"{type.FullName} is not inherited from {typeof(ScriptableObject).FullName}");
- var attr = type.GetCustomAttribute();
- var typeName = type.Name;
- if (typeName.Contains('`'))
- {
- typeName = typeName[..typeName.LastIndexOf('`')];
- }
- switch (Editor.EditorController.instance.MainGameController.CurrentProjectDefaultFileStyle)
- {
- case ProjectDefaultFileStyle.CPP:
- {
- fs.WriteLine($"#include \"{typeName}.helper.h\"");
- if (attr != null)
- {
- var text = attr.DefaultScript;
- fs.Write(text);
- }
- }
- break;
- case ProjectDefaultFileStyle.PY:
- {
-
- }
- break;
- }
- }
-
public static void OpenScriptFile(ScriptableObject so)
{
string path = so.ScriptPath;
@@ -312,14 +63,7 @@ namespace Demo
/// 时间线ID,若不存在则创建
/// 当每次调用NextTimePoint函数时使用的单位值
/// 初始化时间
- [ScriptableCall(@"
-
-重设指定时间线
-
-时间线ID,若不存在则创建
-当每次调用NextTimePoint函数时使用的单位值
-初始化时间
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void ResetTimePoint(string id, string delta, string value)
{
TimePointDelta[id] = float.Parse(delta);
@@ -331,13 +75,7 @@ namespace Demo
///
/// 时间线ID
/// 前进次数,最终时间的增量为前进次数乘该时间线的单位值
- [ScriptableCall(@"
-
-推动时间线前进
-
-时间线ID
-前进次数,最终时间的增量为前进次数乘该时间线的单位值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void NextTimePoint(string id, string times)
{
TimePoints[id] += TimePointDelta[id] * float.Parse(times);
@@ -348,13 +86,7 @@ namespace Demo
///
/// 时间线ID
/// 次数,时间线的值将被设置为次数乘该时间线的单位值
- [ScriptableCall(@"
-
-设置时间线的值
-
-时间线ID
-次数,时间线的值将被设置为次数乘该时间线的单位值
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetTimePoint(string id, string value)
{
TimePoints[id] = TimePointDelta[id] * float.Parse(value);
@@ -397,13 +129,7 @@ namespace Demo
///
/// 字符串
/// 浮点数
- [ScriptableCall(@"
-
-设置局部上下文变量,将会传递给子物体使用
-
-字符串
-浮点数
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetContext(string name, string value)
{
ScriptContextSpace[name] = Parse(value);
@@ -440,18 +166,7 @@ namespace Demo
///
///
///
- [ScriptableCall(@"
-
-从字符串解析为浮点数
- 从时间点列表中获取
- 或是从上下文变量中获取
- 或是从数据驱动对象中获取
- 或是通过计算表达式值获取
- 或是直接调用float.Parse(string)
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public float Parse(string value)
{
value = value.Trim();
@@ -535,14 +250,7 @@ namespace Demo
///
///
///
- [ScriptableCall(@"
-
-设置坐标
-
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetLocalPosition(string x, string y, string z)
{
EnterGameLocalPosition = new(Parse(x), Parse(y), Parse(z));
@@ -553,14 +261,7 @@ namespace Demo
///
///
///
- [ScriptableCall(@"
-
-设置欧拉角
-
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetLocalEulerAngles(string x, string y, string z)
{
EnterGameEulerAngles = new(Parse(x), Parse(y), Parse(z));
@@ -571,14 +272,7 @@ namespace Demo
///
///
///
- [ScriptableCall(@"
-
-设置缩放
-
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetLocalScaling(string x, string y, string z)
{
EnterGameLocalScaling = new(Parse(x), Parse(y), Parse(z));
@@ -588,12 +282,7 @@ namespace Demo
/// 关闭该物体,
/// 在面对如多Game场景时关闭某些GameWorld中默认存在的全局灯光等场景时非常有用
///
- [ScriptableCall(@"
-
-关闭该物体,
-在面对如多Game场景时关闭某些GameWorld中默认存在的全局灯光等场景时非常有用
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetObjectDisable()
{
IsSetObjectDisable = true;
@@ -623,13 +312,7 @@ namespace Demo
/// 属于性能优化的高级选项
///
/// 每frame帧更新一次, 等于0代表不会在状态运行
- [ScriptableCall(@"
-
-指定多少个Update状态的UpdateTicks执行一次更新,不会影响到子物体
-属于性能优化的高级选项
-
-每frame帧更新一次, 等于0代表不会在Update状态运行
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetUpdatePerFrame(string frame)
{
UpdatePerFrame = Mathf.Max(1, int.Parse(frame));
@@ -763,13 +446,7 @@ namespace Demo
///
/// 指定类型
/// 指定脚本,可用决定路径或与当前脚本目录的相对路径
- [ScriptableCall(@"
-
-加载子脚本
-
-指定类型
-指定脚本,可用决定路径或与当前脚本目录的相对路径
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator LoadSubScript([In] string type, [In] string path)
{
return DoLoadSubScriptAsync(type, path, null);
@@ -779,12 +456,7 @@ namespace Demo
/// 获取已加载的脚本对象
///
/// 无法找到时将返回空
- [ScriptableCall(@"
-
-获取已加载的脚本对象
-
-无法找到时将返回空
-")]
+ [Convention.RScript.Variable.Attr.Method]
public ScriptableObject GetLoadedObject(string path)
{
return FindWithPath(path, false);
@@ -794,12 +466,7 @@ namespace Demo
/// 获取父脚本对象
///
///
- [ScriptableCall(@"
-
-获取父脚本对象
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public ScriptableObject GetParentObject()
{
return Parent;
@@ -809,36 +476,12 @@ namespace Demo
/// 获取上一个加载的脚本对象
///
///
- [ScriptableCall(@"
-
-获取上一个加载的脚本对象
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public ScriptableObject GetLastLoadedScriptableObject()
{
return LastLoadedScriptableObject;
}
- /*
- ///
- /// 异步加载子脚本
- ///
- /// 指定类型
- /// 指定脚本,可用决定路径或与当前脚本目录的相对路径
- [ScriptableCall(@"
-
-异步加载子脚本
-
-指定类型
-指定脚本,可用决定路径或与当前脚本目录的相对路径
-")]
- public void LoadSubScriptAsync([In] string type, [In] string path)
- {
- StartCoroutine(DoLoadSubScriptAsync(type, path, null));
- }
- */
-
#endregion
private IEnumerator ParseScript2Expr(string script)
@@ -922,12 +565,7 @@ namespace Demo
/// 获取根脚本对象
///
///
- [ScriptableCall(@"
-
-获取根脚本对象
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public RootObject GetRoot()
{
if (Parent == null)
@@ -1220,19 +858,12 @@ namespace Demo
// 暂时的逻辑是总是展示的
{
TimelineScriptObjectWhichOnShow.Add(this);
- //IsTimelineItemShow = true;
}
}
public override void OnHierarchyItemClick(HierarchyItem item)
{
- //foreach (var tso in TimelineScriptObjectWhichOnShow)
- //{
- // tso.IsTimelineItemShow = false;
- // tso.MyTimelineItem.RawButton.gameObject.SetActive(false);
- //}
- //TimelineScriptObjectWhichOnShow.Clear();
- //ShowTimelineItemWithChilds();
+
}
//protected virtual void ShowTimelineItemWithChilds()
@@ -1255,10 +886,9 @@ namespace Demo
protected override void UpdateTicks(float currentTime, float deltaTime, TickType tickType)
{
base.UpdateTicks(currentTime, deltaTime, tickType);
- //if (IsTimelineItemShow)
- //{
+ {
MyTimelineItem.ResizeOnTimeline();
- //}
+ }
}
protected abstract void SetupTimelineItem(Editor.UI.TimelineItem item);
diff --git a/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs b/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs
index 012609a..9359527 100644
--- a/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs
+++ b/Assets/Scripts/Framework/ScriptableObjectInstantiate/DefaultScriptableObjectInstantiate.cs
@@ -84,12 +84,7 @@ namespace Demo.Game
var childName = type;
int childIndex = 1;
var childFullNameWithoutExtension = childName;
- var extension = so.GetRoot().RootGameController.CurrentProjectDefaultFileStyle switch
- {
- ProjectDefaultFileStyle.CPP => ".h",
- ProjectDefaultFileStyle.PY => ".py",
- _ => ""
- };
+ var extension = ".h";
if (childDir.Exists())
{
childFullNameWithoutExtension = $"{childName}{(childIndex == 1 ? "" : childIndex.ToString())}";
@@ -125,7 +120,7 @@ namespace Demo.Game
// 新建时添加模板内容
using var childFileStream = File.AppendText(childFile);
{
- DefaultScriptUtility.WriteDefaultScript(childFileStream, ScriptableObject.FastScriptableObjectTypen[type]);
+ //ScriptUtility.WriteDefaultScript(childFileStream, ScriptableObject.FastScriptableObjectTypen[type]);
childFileStream.Close();
}
//不刷新世界,直接加载
@@ -134,7 +129,7 @@ namespace Demo.Game
// 打开手动编辑
try
{
- DefaultScriptUtility.OpenScriptFile(targetChildSO);
+ ScriptUtility.OpenScriptFile(targetChildSO);
}
catch (Exception ex)
{
@@ -217,7 +212,7 @@ namespace Demo.Game
// Open Script
new("Open",_=>
{
- DefaultScriptUtility.OpenScriptFile(self);
+ ScriptUtility.OpenScriptFile(self);
}),
new("----------",_=>{ })
};
diff --git a/Assets/Scripts/Framework/SubWorld.cs b/Assets/Scripts/Framework/SubWorld.cs
index 3cd90f9..ad93e2e 100644
--- a/Assets/Scripts/Framework/SubWorld.cs
+++ b/Assets/Scripts/Framework/SubWorld.cs
@@ -69,12 +69,7 @@ namespace Demo.Game
/// 加载附属场景
///
///
- [ScriptableCall(@"
-
-加载附属场景
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Load(string project)
{
this.project = project;
diff --git a/Assets/Scripts/Framework/Updatement.cs b/Assets/Scripts/Framework/Updatement.cs
index e7ff4b7..2bc3d67 100644
--- a/Assets/Scripts/Framework/Updatement.cs
+++ b/Assets/Scripts/Framework/Updatement.cs
@@ -130,12 +130,7 @@ namespace Demo.Game
/// 设置更新对象
///
/// 脚本的相对路径
- [ScriptableCall(@"
-
-设置更新对象
-
-脚本的相对路径
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetUpdateTarget(string path)
{
var temp = FindWithPath(path);
diff --git a/Assets/Scripts/Framework/[RScript] b/Assets/Scripts/Framework/[RScript]
index 58f3d10..29dd4f5 160000
--- a/Assets/Scripts/Framework/[RScript]
+++ b/Assets/Scripts/Framework/[RScript]
@@ -1 +1 @@
-Subproject commit 58f3d1067cfdd19f8c4c7f3934ce7102b3685397
+Subproject commit 29dd4f5d96898b1cbca59c6f0d178591ebb8baa9
diff --git a/Assets/Scripts/Interaction/Effect/ParticleEffect.cs b/Assets/Scripts/Interaction/Effect/ParticleEffect.cs
index 974f7d4..584f9a7 100644
--- a/Assets/Scripts/Interaction/Effect/ParticleEffect.cs
+++ b/Assets/Scripts/Interaction/Effect/ParticleEffect.cs
@@ -28,13 +28,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-加载预制体作为子物体
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string ab, string prefab)
{
yield return this.LoadAssetBundle(ab, x =>
diff --git a/Assets/Scripts/Interaction/IEffectHookObject.cs b/Assets/Scripts/Interaction/IEffectHookObject.cs
index 3c5d1da..ea5e297 100644
--- a/Assets/Scripts/Interaction/IEffectHookObject.cs
+++ b/Assets/Scripts/Interaction/IEffectHookObject.cs
@@ -104,11 +104,7 @@ namespace Demo.Game
/// 绑定IInteraction对象,若不手动绑定则会自动绑定到父物体的IInteraction
///
///
- [ScriptableCall(@"
-
-绑定IInteraction对象,若不手动绑定则会自动绑定到父物体的IInteraction
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Bind(string path)
{
MyInteractionModule = FindWithPath(path) as IInteraction;
@@ -118,12 +114,7 @@ namespace Demo.Game
/// 设置监听状态,当目标进入指定监听的状态时触发启动事件,退出时触发结束事件
///
/// VisibleDuration,InteractiveDuration,InteractableScoreInterval,InteractableIntervalThatCanScoreBest
- [ScriptableCall(@"
-
-设置监听状态,当目标进入指定监听的状态时触发启动事件,退出时触发结束事件
-
-VisibleDuration,InteractiveDuration,InteractableScoreInterval,InteractableIntervalThatCanScoreBest
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractiveEffectType(string type)
{
MyInteractiveLevel = Enum.Parse(type);
diff --git a/Assets/Scripts/Interaction/IInteraction.cs b/Assets/Scripts/Interaction/IInteraction.cs
index 2d4c4af..92fd006 100644
--- a/Assets/Scripts/Interaction/IInteraction.cs
+++ b/Assets/Scripts/Interaction/IInteraction.cs
@@ -323,12 +323,7 @@ namespace Demo.Game
/// 使用配置中的区间长度设置以最佳判定点为中心的各级区间
///
/// 最佳判定点
- [ScriptableCall(@"
-
-使用配置中的区间长度设置以最佳判定点为中心的各级区间
-
-最佳判定点
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetupJudgement(string bestJudgementTimePoint)
{
DoSetupJudgement(Parse(bestJudgementTimePoint));
@@ -346,20 +341,7 @@ namespace Demo.Game
/// (bestJudgementTimePoint-interactiveDuration/2,bestJudgementTimePoint+interactiveDuration/2)
/// 区间时长,最终结果为
/// (bestJudgementTimePoint-visibleDuration/2,bestJudgementTimePoint+visibleDuration/2)
- [ScriptableCall(@"
-
-通过传递对称区间进行初始化
-
-最佳判定点
-区间时长,最终结果为
-(bestJudgementTimePoint-interactableIntervalThatCanScoreBest/2,bestJudgementTimePoint+interactableIntervalThatCanScoreBest/2)
-区间时长,最终结果为
-(bestJudgementTimePoint-interactableScoreInterval/2,bestJudgementTimePoint+interactableScoreInterval/2)
-区间时长,最终结果为
-(bestJudgementTimePoint-interactiveDuration/2,bestJudgementTimePoint+interactiveDuration/2)
-区间时长,最终结果为
-(bestJudgementTimePoint-visibleDuration/2,bestJudgementTimePoint+visibleDuration/2)
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetupJudgementLevels(
string bestJudgementTimePoint,
string interactableIntervalThatCanScoreBest,
@@ -379,12 +361,7 @@ namespace Demo.Game
/// 设置可见区间(显现但不可判定,3级判定区间)开始时间
///
///
- [ScriptableCall(@"
-
-设置可见区间(显现但不可判定,3级判定区间)开始时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVisibleDurationBegin(string value)
{
VisibleDuration.x = Parse(value);
@@ -393,12 +370,7 @@ namespace Demo.Game
/// 设置可见区间(显现但不可判定,3级判定区间)结束时间
///
///
- [ScriptableCall(@"
-
-设置可见区间(显现但不可判定,3级判定区间)结束时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetVisibleDurationEnd(string value)
{
VisibleDuration.y = Parse(value);
@@ -408,12 +380,7 @@ namespace Demo.Game
/// 设置2级判定区间(可判定但错误的)开始时间
///
///
- [ScriptableCall(@"
-
-设置2级判定区间(可判定但错误的)开始时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractiveDurationBegin(string value)
{
InteractiveDuration.x = Parse(value);
@@ -422,12 +389,7 @@ namespace Demo.Game
/// 设置2级判定区间(可判定但错误的)结束时间
///
///
- [ScriptableCall(@"
-
-设置2级判定区间(可判定但错误的)结束时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractiveDurationEnd(string value)
{
InteractiveDuration.y = Parse(value);
@@ -437,12 +399,7 @@ namespace Demo.Game
/// 设置1级判定区间(可判定的)开始时间
///
///
- [ScriptableCall(@"
-
-设置1级判定区间(可判定的)开始时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractableScoreIntervalBegin(string value)
{
InteractableScoreInterval.x = Parse(value);
@@ -451,12 +408,7 @@ namespace Demo.Game
/// 设置1级判定区间(可判定的)结束时间
///
///
- [ScriptableCall(@"
-
-设置1级判定区间(可判定的)结束时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractableScoreIntervalEnd(string value)
{
InteractableScoreInterval.y = Parse(value);
@@ -466,12 +418,7 @@ namespace Demo.Game
/// 设置0级判定区间(最佳判定)开始时间
///
///
- [ScriptableCall(@"
-
-设置0级判定区间(最佳判定)开始时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractableIntervalThatCanScoreBestBegin(string value)
{
InteractableIntervalThatCanScoreBest.x = Parse(value);
@@ -484,12 +431,7 @@ namespace Demo.Game
/// 设置0级判定区间(最佳判定)结束时间
///
///
- [ScriptableCall(@"
-
-设置0级判定区间(最佳判定)结束时间
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetInteractableIntervalThatCanScoreBestEnd(string value)
{
InteractableIntervalThatCanScoreBest.y = Parse(value);
diff --git a/Assets/Scripts/Interaction/IJudgementHookObject.cs b/Assets/Scripts/Interaction/IJudgementHookObject.cs
index a785f9b..17668c6 100644
--- a/Assets/Scripts/Interaction/IJudgementHookObject.cs
+++ b/Assets/Scripts/Interaction/IJudgementHookObject.cs
@@ -23,11 +23,7 @@ namespace Demo.Game
/// 绑定IInteraction对象,若不手动绑定则会自动绑定到父物体的IInteraction
///
///
- [ScriptableCall(@"
-
-绑定IInteraction对象,若不手动绑定则会自动绑定到父物体的IInteraction
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Bind(string path)
{
MyInteractionModule = FindWithPath(path) as IInteraction;
diff --git a/Assets/Scripts/Interaction/Interaction/FullScreenInteraction.cs b/Assets/Scripts/Interaction/Interaction/FullScreenInteraction.cs
index ca4f928..a0e599d 100644
--- a/Assets/Scripts/Interaction/Interaction/FullScreenInteraction.cs
+++ b/Assets/Scripts/Interaction/Interaction/FullScreenInteraction.cs
@@ -17,7 +17,7 @@ namespace Demo.Game
///
/// 设置为Hold模式, 即不需要点按即可判定的模式
///
- [ScriptableCall(@"设置为Hold模式, 即不需要点按即可判定的模式")]
+ [Convention.RScript.Variable.Attr.Method]
public void EnableHoldMode()
{
IsNeedTap = false;
diff --git a/Assets/Scripts/Interaction/JudgementEffect/ParticleJudgement.cs b/Assets/Scripts/Interaction/JudgementEffect/ParticleJudgement.cs
index e33fe18..8e89657 100644
--- a/Assets/Scripts/Interaction/JudgementEffect/ParticleJudgement.cs
+++ b/Assets/Scripts/Interaction/JudgementEffect/ParticleJudgement.cs
@@ -30,15 +30,7 @@ namespace Demo.Game
///
///
/// 判定效果会现形的持续时间
- [ScriptableCall(@"
-
-加载预制体作为子物体
-
-正整数, 0级判定为最佳判定, 判定等级对应会出现的粒子效果
-
-
-判定效果会现形的持续时间
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string level, string ab, string prefab, string duration)
{
var levelId = (IInteraction.JudgementLevel)int.Parse(level);
diff --git a/Assets/Scripts/LookAtAnchor.cs b/Assets/Scripts/LookAtAnchor.cs
index c28e054..1b701f9 100644
--- a/Assets/Scripts/LookAtAnchor.cs
+++ b/Assets/Scripts/LookAtAnchor.cs
@@ -52,13 +52,7 @@ namespace Demo.Game
///
///
/// 对象相对路径,不存在时将解除锁定
- [ScriptableCall(@"
-
-在指定时刻切换面向的物体,并尝试一次更新
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string target)
{
ManualAddEntry(time, target, default);
@@ -67,11 +61,7 @@ namespace Demo.Game
///
/// 启动自动更新,将持续锁定面向的物体并更新
///
- [ScriptableCall(@"
-
-启动自动更新,将持续锁定面向的物体并更新
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void EnableUpdateEveryTick()
{
IsEnableUpdateEveryTick = true;
diff --git a/Assets/Scripts/MaterialUpdatement.cs b/Assets/Scripts/MaterialUpdatement.cs
index 9a0513e..901a6ff 100644
--- a/Assets/Scripts/MaterialUpdatement.cs
+++ b/Assets/Scripts/MaterialUpdatement.cs
@@ -46,12 +46,7 @@ namespace Demo.Game
/// 对应ab包名称,自动匹配对应平台
///
///
- [ScriptableCall(@"
-
-对应ab包名称,自动匹配对应平台
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string ab)
{
yield return this.LoadAssetBundle(ab, x =>
@@ -66,13 +61,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-在指定时刻切换父物体上的MeshRenderer.material
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string material)
{
ManualAddEntry(time, material, default);
diff --git a/Assets/Scripts/MoreMaterialUpdatement/BaseOnMaterialUpdatement.cs b/Assets/Scripts/MoreMaterialUpdatement/BaseOnMaterialUpdatement.cs
index 6165679..b38353f 100644
--- a/Assets/Scripts/MoreMaterialUpdatement/BaseOnMaterialUpdatement.cs
+++ b/Assets/Scripts/MoreMaterialUpdatement/BaseOnMaterialUpdatement.cs
@@ -26,12 +26,7 @@ namespace Demo.Game
/// 绑定到允许的渲染器
///
/// 脚本位置
- [ScriptableCall(@"
-
-绑定到允许的渲染器
-
-脚本位置
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Load(string path)
{
var so = FindWithPath(path, false);
diff --git a/Assets/Scripts/MoreSpline/BasicSplineRenderer.cs b/Assets/Scripts/MoreSpline/BasicSplineRenderer.cs
index 98a5cc7..f0390fd 100644
--- a/Assets/Scripts/MoreSpline/BasicSplineRenderer.cs
+++ b/Assets/Scripts/MoreSpline/BasicSplineRenderer.cs
@@ -72,21 +72,13 @@ namespace Demo.Game
///
///
/// 可取值为30种缓动曲线
- [ScriptableCall(@"
-
-新增
-
-插值时间
-
-
-可取值为30种缓动曲线
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string from, string to, string curveType)
{
ManualAddEntry(time, new(float.Parse(from), float.Parse(to)), Enum.Parse(curveType));
}
- [ScriptableCall(DependOnSplineCoreUtility.LoadSplineDescription)]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator LoadSpline(string path)
{
yield return this.LoadSplineTool(path);
@@ -98,13 +90,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-加载对应ab包并加载指定材质
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator LoadMaterial(string ab, string material)
{
yield return this.LoadAssetBundle(ab, x =>
@@ -149,12 +135,7 @@ namespace Demo.Game
/// 设置材质UV映射
///
/// Clip, UniformClip, Clamp, UniformClamp
- [ScriptableCall(@"
-
-设置材质UV映射
-
-Clip, UniformClip, Clamp, UniformClamp
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetUVMode(string mode)
{
MyUVMode = Enum.Parse(mode);
diff --git a/Assets/Scripts/MoreSpline/SplineAnchor.cs b/Assets/Scripts/MoreSpline/SplineAnchor.cs
index 4f454fd..cd9709b 100644
--- a/Assets/Scripts/MoreSpline/SplineAnchor.cs
+++ b/Assets/Scripts/MoreSpline/SplineAnchor.cs
@@ -26,7 +26,7 @@ namespace Demo.Game
/// 加载并绑定到新样条线
///
/// 对象路径, 不存在时则立刻加载
- [ScriptableCall(DependOnSplineCoreUtility.LoadSplineDescription)]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator LoadSpline(string path)
{
yield return this.LoadSplineTool(path);
@@ -36,12 +36,7 @@ namespace Demo.Game
/// 必须先执行LoadSpline加载样条线
///
/// 百分比所在位置,取值范围是[0,1]
- [ScriptableCall(@"
-
-必须先执行LoadSpline加载样条线
-
-百分比所在位置,取值范围是[0,1]
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void EvaluatePosition(string value)
{
MySplineOffset = Parse(value);
@@ -56,16 +51,7 @@ namespace Demo.Game
/// 时刻
/// 是否跟随位置, 默认开启
/// 是否跟随旋转, 默认开启
- [ScriptableCall(@"
-
-绑定到样条线渲染器上(必须已经加载),
-并设置跟随指定时间的时刻渲染器所生成的头部
-
-对象路径, 不存在时则立刻加载
-时刻
-是否跟随位置, 默认开启
-是否跟随旋转, 默认开启
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void LoadSplineRenderer(string path, string time, string isFollowPosition = "true", string isFollowRotation = "true")
{
MySplineRenderer = this.LoadSplineRendererTool(path);
diff --git a/Assets/Scripts/MoreSpline/SplineCore.cs b/Assets/Scripts/MoreSpline/SplineCore.cs
index 1fa13fc..5a61570 100644
--- a/Assets/Scripts/MoreSpline/SplineCore.cs
+++ b/Assets/Scripts/MoreSpline/SplineCore.cs
@@ -108,12 +108,7 @@ namespace Demo.Game
/// 设置样条线类型
///
/// CatmullRom, BSpline, Bezier, Linear
- [ScriptableCall(@"
-
-设置样条线类型
-
-CatmullRom, BSpline, Bezier, Linear
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetType(string mode)
{
MyType = Enum.Parse(mode);
@@ -123,12 +118,7 @@ namespace Demo.Game
/// 设置采样类型
///
/// Default, Uniform, Optimized
- [ScriptableCall(@"
-
-设置采样类型
-
-Default, Uniform, Optimized
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetSampleMode(string mode)
{
MySampleMode = Enum.Parse(mode);
@@ -138,11 +128,7 @@ namespace Demo.Game
///
/// 闭环曲线
///
- [ScriptableCall(@"
-
-闭环曲线
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetClose()
{
IsClose = true;
@@ -152,12 +138,7 @@ namespace Demo.Game
/// 加载并加入新节点
///
/// 脚本位置
- [ScriptableCall(@"
-
-加载并加入新节点
-
-脚本位置
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator LoadNode(string path)
{
yield return DoLoadSubScriptAsync(nameof(SplineNode), path, node =>
@@ -178,13 +159,7 @@ namespace Demo.Game
/// 那么为其添加SplineNode组件
///
/// 脚本位置
- [ScriptableCall(@"
-
-加入已加载的节点,如果目标脚本不是SplineNode,
-那么为其添加SplineNode组件
-
-脚本位置
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void AddNode(string path)
{
var node = FindWithPath(path);
diff --git a/Assets/Scripts/MoreSpline/SplineNode.cs b/Assets/Scripts/MoreSpline/SplineNode.cs
index e2375e8..708a239 100644
--- a/Assets/Scripts/MoreSpline/SplineNode.cs
+++ b/Assets/Scripts/MoreSpline/SplineNode.cs
@@ -37,12 +37,7 @@ namespace Demo.Game
/// 设置节点大小,默认为1
///
///
- [ScriptableCall(@"
-
-设置节点大小,默认为1
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetNodeSize(string size)
{
NodeSize = Parse(size);
@@ -55,15 +50,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-设置节点颜色,默认为(1,1,1,1)
-
-
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetNodeColor(string r, string g, string b, string a)
{
NodeColor = new(Parse(r), Parse(g), Parse(b), Parse(a));
@@ -75,14 +62,7 @@ namespace Demo.Game
///
///
///
- [ScriptableCall(@"
-
-设置节点旋转,节点正面forward向量为法线
-
-
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetNodeRotation(string x, string y, string z)
{
IsSetupNodeRotation = true;
diff --git a/Assets/Scripts/MoreSpline/SplineTubeRenderer.cs b/Assets/Scripts/MoreSpline/SplineTubeRenderer.cs
index 6e9dc0a..971dc63 100644
--- a/Assets/Scripts/MoreSpline/SplineTubeRenderer.cs
+++ b/Assets/Scripts/MoreSpline/SplineTubeRenderer.cs
@@ -44,11 +44,7 @@ namespace Demo.Game
///
/// 禁用双面渲染,用于优化性能
///
- [ScriptableCall(@"
-
-禁用双面渲染,用于优化性能
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void DisableDoubleSide()
{
IsDoubleSide = false;
@@ -58,12 +54,7 @@ namespace Demo.Game
/// 设置面数,越高越圆润
///
///
- [ScriptableCall(@"
-
-设置面数,越高越圆润
-
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void SetSides(int sides)
{
SidesCount = Mathf.Min(3, sides);
diff --git a/Assets/Scripts/MoreSpline/Updatement/BasicSplineJustFollow.cs b/Assets/Scripts/MoreSpline/Updatement/BasicSplineJustFollow.cs
index 9cc06e7..5f284da 100644
--- a/Assets/Scripts/MoreSpline/Updatement/BasicSplineJustFollow.cs
+++ b/Assets/Scripts/MoreSpline/Updatement/BasicSplineJustFollow.cs
@@ -33,14 +33,7 @@ namespace Demo.Game
/// 插值时间
///
/// 可取值为30种缓动曲线
- [ScriptableCall(@"
-
-新增
-
-插值时间
-
-可取值为30种缓动曲线
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string value, string curveType)
{
ManualAddEntry(time, float.Parse(value), Enum.Parse(curveType));
@@ -50,12 +43,7 @@ namespace Demo.Game
/// 如未加载则加载,然后绑定到样条线
///
/// 脚本位置
- [ScriptableCall(@"
-
-如未加载则加载,然后绑定到样条线
-
-脚本位置
-")]
+ [Convention.RScript.Variable.Attr.Method]
public IEnumerator Load(string path)
{
MySplineCore = FindWithPath(path, false) as SplineCore;
diff --git a/Assets/Scripts/MoreSpline/Updatement/SplineHeadObject.cs b/Assets/Scripts/MoreSpline/Updatement/SplineHeadObject.cs
index 128949a..b44d7b3 100644
--- a/Assets/Scripts/MoreSpline/Updatement/SplineHeadObject.cs
+++ b/Assets/Scripts/MoreSpline/Updatement/SplineHeadObject.cs
@@ -100,12 +100,7 @@ namespace Demo.Game
/// 设置为仅跟随,将会被动的跟随spline运动,
/// 这在多个脚本都绑定在同一个spline计算核心上时非常有用
///
- [ScriptableCall(@"
-
-设置为仅跟随,将会被动的跟随spline运动,
-这在多个脚本都绑定在同一个spline计算核心上时非常有用
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void JustFollow()
{
IsJustFollow = true;
diff --git a/Assets/Scripts/MoreSpline/Updatement/SplineMovement.cs b/Assets/Scripts/MoreSpline/Updatement/SplineMovement.cs
index 6457d67..ba19a19 100644
--- a/Assets/Scripts/MoreSpline/Updatement/SplineMovement.cs
+++ b/Assets/Scripts/MoreSpline/Updatement/SplineMovement.cs
@@ -97,12 +97,7 @@ namespace Demo.Game
/// 设置为仅跟随,将会被动的跟随spline运动,
/// 这在多个脚本都绑定在同一个spline计算核心上时非常有用
///
- [ScriptableCall(@"
-
-设置为仅跟随,将会被动的跟随spline运动,
-这在多个脚本都绑定在同一个spline计算核心上时非常有用
-
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void JustFollow()
{
IsJustFollow = true;
diff --git a/Assets/Scripts/TickMovement.cs b/Assets/Scripts/TickMovement.cs
index 2682e0f..00d70e3 100644
--- a/Assets/Scripts/TickMovement.cs
+++ b/Assets/Scripts/TickMovement.cs
@@ -32,16 +32,7 @@ namespace Demo.Game
/// y
/// z
/// 可取值为30种缓动曲线
- [ScriptableCall(@"
-
-新增
-
-插值时间
-x
-y
-z
-可取值为30种缓动曲线
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string x, string y, string z, string curveType)
{
ManualAddEntry(time,
diff --git a/Assets/Scripts/TickRotation.cs b/Assets/Scripts/TickRotation.cs
index 7674dcd..3eee130 100644
--- a/Assets/Scripts/TickRotation.cs
+++ b/Assets/Scripts/TickRotation.cs
@@ -29,16 +29,7 @@ namespace Demo.Game
/// y
/// z
/// 可取值为30种缓动曲线
- [ScriptableCall(@"
-
-新增
-
-插值时间
-x
-y
-z
-可取值为30种缓动曲线
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string x, string y, string z, string curveType)
{
ManualAddEntry(time,
diff --git a/Assets/Scripts/TickScaling.cs b/Assets/Scripts/TickScaling.cs
index c66fd79..b605923 100644
--- a/Assets/Scripts/TickScaling.cs
+++ b/Assets/Scripts/TickScaling.cs
@@ -29,16 +29,7 @@ namespace Demo.Game
/// y
/// z
/// 可取值为30种缓动曲线
- [ScriptableCall(@"
-
-新增
-
-插值时间
-x
-y
-z
-可取值为30种缓动曲线
-")]
+ [Convention.RScript.Variable.Attr.Method]
public void Add(string time, string x, string y, string z, string curveType)
{
ManualAddEntry(time,