Skip to content

Commit

Permalink
Bugfix: Remove pipe (|) characters from type names when dumping metad…
Browse files Browse the repository at this point in the history
…ata.
  • Loading branch information
Sam committed Sep 5, 2020
1 parent 7212daf commit 7d2e90a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Cpp2IL/AssemblyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ private static List<CppMethodData> ProcessTypeContents(Il2CppMetadata metadata,
var methodDefinition = new MethodDefinition(methodName, (MethodAttributes) methodDef.flags,
ilTypeDefinition.Module.ImportReference(typeof(void)));

//TODO: For Unity 2019 we'll need to fix the imageindex param from 0 to the actual index
var offsetInRam = cppAssembly.GetMethodPointer(methodDef.methodIndex, methodId, imageDef.assemblyIndex, methodDef.token);


Expand Down Expand Up @@ -371,7 +370,7 @@ private static List<CppMethodData> ProcessTypeContents(Il2CppMetadata metadata,
ilTypeDefinition.Events.Add(eventDefinition);
}

File.WriteAllText(Path.Combine(Path.GetFullPath("cpp2il_out"), "types", ilTypeDefinition.Module.Assembly.Name.Name, ilTypeDefinition.Name.Replace("<", "_").Replace(">", "_") + "_metadata.txt"), typeMetaText.ToString());
File.WriteAllText(Path.Combine(Path.GetFullPath("cpp2il_out"), "types", ilTypeDefinition.Module.Assembly.Name.Name, ilTypeDefinition.Name.Replace("<", "_").Replace(">", "_").Replace("|", "_") + "_metadata.txt"), typeMetaText.ToString());

if (cppTypeDefinition.genericContainerIndex < 0) return typeMethods; //Finished processing if not generic

Expand Down

0 comments on commit 7d2e90a

Please sign in to comment.