From d81ebbece8c952664740c955312bbbd1194bb3f2 Mon Sep 17 00:00:00 2001
From: ninemine <1371605831@qq.com>
Date: Wed, 15 Oct 2025 01:16:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E8=BD=AC=E6=8D=A2=E5=87=BD?=
=?UTF-8?q?=E6=95=B0=E8=BE=93=E5=85=A5=E4=BB=A5=E5=8C=B9=E9=85=8D=E6=96=B0?=
=?UTF-8?q?=E7=9A=84=E8=A7=A3=E6=9E=90=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Assets/Scripts/Framework/ScriptableObject.cs | 29 ++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/Assets/Scripts/Framework/ScriptableObject.cs b/Assets/Scripts/Framework/ScriptableObject.cs
index 4071e10..e8463e2 100644
--- a/Assets/Scripts/Framework/ScriptableObject.cs
+++ b/Assets/Scripts/Framework/ScriptableObject.cs
@@ -431,13 +431,27 @@ namespace Demo
public static float OneBarTime = 1;
///
+ /// 从字符串解析为浮点数
/// 从时间点列表中获取
/// 或是从上下文变量中获取
- /// 或是从数据驱动对象的泛型中获取
+ /// 或是从数据驱动对象中获取
+ /// 或是通过计算表达式值获取
/// 或是直接调用
///
///
///
+ [ScriptableCall(@"
+
+从字符串解析为浮点数
+ 从时间点列表中获取
+ 或是从上下文变量中获取
+ 或是从数据驱动对象中获取
+ 或是通过计算表达式值获取
+ 或是直接调用float.Parse(string)
+
+
+
+")]
public float Parse(string value)
{
value = value.Trim();
@@ -900,13 +914,24 @@ namespace Demo
public ScriptableObject Parent;
+ ///
+ /// 获取根脚本对象
+ ///
+ ///
+ [ScriptableCall(@"
+
+获取根脚本对象
+
+
+")]
public RootObject GetRoot()
{
if (Parent == null)
return this as RootObject;
if (Parent is RootObject result)
return result;
- else return Parent.GetRoot();
+ else
+ return Parent.GetRoot();
}
public List Childs = new();