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();