推进修改
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Demo.Game
|
||||
|
||||
[Setting] public string ScriptName = "";
|
||||
private string[] ChildTypes = null;
|
||||
public ScriptLoadableConfig[] childs = null;
|
||||
private ScriptLoadableConfig[] childs = null;
|
||||
|
||||
[Setting] public ScriptableObject target;
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Demo.Game
|
||||
BinarySerializeUtility.WriteBool(writer, IsSetObjectDisable);
|
||||
BinarySerializeUtility.WriteInt(writer, UpdatePerFrame);
|
||||
BinarySerializeUtility.WriteString(writer, ScriptName);
|
||||
childs = (from child in target.Childs select child.Config).ToArray();
|
||||
ChildTypes = (from child in childs select child.GetType().Name).ToArray();
|
||||
BinarySerializeUtility.SerializeArray(writer, ChildTypes);
|
||||
foreach (var child in childs)
|
||||
@@ -122,10 +123,6 @@ namespace Demo.Game
|
||||
{
|
||||
return (ConfigT)Config;
|
||||
}
|
||||
public virtual void UpdateConfig()
|
||||
{
|
||||
Config.childs = (from child in this.Childs select child.Config).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置坐标
|
||||
@@ -654,7 +651,6 @@ namespace Demo.Game
|
||||
if (this.ScriptableObjectContents.IsCreated)
|
||||
this.ScriptableObjectContents.Dispose();
|
||||
}
|
||||
UpdateConfig();
|
||||
IsScriptApply = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user