Skip to content

Commit 13a357b

Browse files
committed
create debugoutputs, don't discard misread assets
1 parent 93a5c08 commit 13a357b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Source/AssetRipper.Import/Structure/Assembly/Serializable/SerializableStructure.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,24 @@ public bool TryRead(ref EndianSpanReader reader, UnityVersion version, TransferI
112112
{
113113
LogMonoBehaviorReadException(this, ex);
114114
WriteDebug(ref reader);
115-
return false;
115+
//return false;
116116
}
117117
if (reader.Position != reader.Length)
118118
{
119119
LogMonoBehaviourMismatch(this, reader.Position, reader.Length);
120120
WriteDebug(ref reader);
121-
return false;
121+
//return false;
122122
}
123123
return true;
124124
}
125125

126126
private void WriteDebug(ref EndianSpanReader reader)
127127
{
128+
if (!Directory.Exists("DebugOutputs"))
129+
{
130+
Directory.CreateDirectory("DebugOutputs");
131+
}
132+
128133
string name = Path.Combine("DebugOutputs", "MismatchedAsset_" + Type.Name);
129134
string fullName;
130135

0 commit comments

Comments
 (0)