mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-02-02 17:20:07 -05:00
Support exporting MonoBehaviour to json. Close #477
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
@ -52,6 +52,35 @@ namespace AssetStudio
|
||||
return null;
|
||||
}
|
||||
|
||||
public string Dump(List<TypeTreeNode> m_Nodes)
|
||||
{
|
||||
if (m_Nodes != null)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
TypeTreeHelper.ReadTypeString(sb, m_Nodes, reader);
|
||||
return sb.ToString();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public OrderedDictionary ToType()
|
||||
{
|
||||
if (serializedType?.m_Nodes != null)
|
||||
{
|
||||
return TypeTreeHelper.ReadType(serializedType.m_Nodes, reader);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public OrderedDictionary ToType(List<TypeTreeNode> m_Nodes)
|
||||
{
|
||||
if (m_Nodes != null)
|
||||
{
|
||||
return TypeTreeHelper.ReadType(m_Nodes, reader);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public byte[] GetRawData()
|
||||
{
|
||||
reader.Reset();
|
||||
|
||||
Reference in New Issue
Block a user