mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-08-30 00:24:16 -04:00
Fixed bug
This commit is contained in:
@ -9,7 +9,7 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
//TODO unfinished
|
//TODO unfinished
|
||||||
//Separate, EngineType read
|
//Separate, EngineType read
|
||||||
public class ScriptDumper : IDisposable
|
public sealed class ScriptDumper : IDisposable
|
||||||
{
|
{
|
||||||
private Dictionary<string, ModuleDef> moduleDic = new Dictionary<string, ModuleDef>();
|
private Dictionary<string, ModuleDef> moduleDic = new Dictionary<string, ModuleDef>();
|
||||||
|
|
||||||
@ -71,6 +71,8 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (moduleDic != null)
|
||||||
{
|
{
|
||||||
foreach (var pair in moduleDic)
|
foreach (var pair in moduleDic)
|
||||||
{
|
{
|
||||||
@ -79,6 +81,7 @@ namespace AssetStudio
|
|||||||
moduleDic.Clear();
|
moduleDic.Clear();
|
||||||
moduleDic = null;
|
moduleDic = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static StringBuilder CreateMonoBehaviourHeader(MonoBehaviour m_MonoBehaviour)
|
private static StringBuilder CreateMonoBehaviourHeader(MonoBehaviour m_MonoBehaviour)
|
||||||
{
|
{
|
||||||
@ -345,11 +348,12 @@ namespace AssetStudio
|
|||||||
{
|
{
|
||||||
if (fieldDef.FieldType.IsGenericParameter)
|
if (fieldDef.FieldType.IsGenericParameter)
|
||||||
{
|
{
|
||||||
foreach (var g in typeDef.GenericParameters)
|
for (var i = 0; i < typeDef.GenericParameters.Count; i++)
|
||||||
{
|
{
|
||||||
|
var g = typeDef.GenericParameters[i];
|
||||||
if (g.FullName == fieldDef.FieldType.FullName)
|
if (g.FullName == fieldDef.FieldType.FullName)
|
||||||
{
|
{
|
||||||
var type = ((GenericInstSig)typeSig).GenericArguments[0];
|
var type = ((GenericInstSig)typeSig).GenericArguments[i];
|
||||||
DumpType(type, sb, reader, fieldDef.Name, indent + 1);
|
DumpType(type, sb, reader, fieldDef.Name, indent + 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user