Improve SerializedFile reading.

This commit is contained in:
Perfare
2021-05-28 22:23:07 +08:00
parent caa45216ef
commit 432116d834
17 changed files with 218 additions and 159 deletions

View File

@ -120,8 +120,8 @@ namespace AssetStudioGUI
var type = m_MonoBehaviour.ToType();
if (type == null)
{
var nodes = Studio.MonoBehaviourToTypeTreeNodes(m_MonoBehaviour);
type = m_MonoBehaviour.ToType(nodes);
var m_Type = Studio.MonoBehaviourToTypeTree(m_MonoBehaviour);
type = m_MonoBehaviour.ToType(m_Type);
}
var str = JsonConvert.SerializeObject(type, Formatting.Indented);
File.WriteAllText(exportFullPath, str);
@ -373,8 +373,8 @@ namespace AssetStudioGUI
var str = item.Asset.Dump();
if (str == null && item.Asset is MonoBehaviour m_MonoBehaviour)
{
var nodes = Studio.MonoBehaviourToTypeTreeNodes(m_MonoBehaviour);
str = m_MonoBehaviour.Dump(nodes);
var m_Type = Studio.MonoBehaviourToTypeTree(m_MonoBehaviour);
str = m_MonoBehaviour.Dump(m_Type);
}
if (str != null)
{