修复上下文bug
This commit is contained in:
@@ -318,8 +318,12 @@ namespace Demo
|
||||
return;
|
||||
}
|
||||
this.Parent = parent;
|
||||
if (parent != null)
|
||||
if (parent != null && parent.ScriptableObjectContents.IsCreated)
|
||||
{
|
||||
if (ScriptableObjectContents.IsCreated == false)
|
||||
{
|
||||
ScriptableObjectContents = new(parent.ScriptableObjectContents.Count, AllocatorManager.Persistent);
|
||||
}
|
||||
foreach (var item in parent.ScriptableObjectContents)
|
||||
{
|
||||
this.ScriptableObjectContents[item.Key] = item.Value;
|
||||
@@ -612,6 +616,7 @@ namespace Demo
|
||||
}
|
||||
// 释放资源
|
||||
{
|
||||
if (this.ScriptableObjectContents.IsCreated)
|
||||
this.ScriptableObjectContents.Dispose();
|
||||
}
|
||||
IsScriptApply = true;
|
||||
|
||||
Reference in New Issue
Block a user