Esempio n. 1
0
 internal static void Main()
 {
     AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly("Assembly-CSharp.dll.original");
     var bundle = UnityBundle.ReadFromFile("globalgamemanagers.assets.original");
     new UnusedMethodsRemover(assembly, bundle).Execute();
     var renamer = new ElementsRenamer(assembly, bundle);
     renamer.Execute();
     assembly.Write("Assembly-CSharp.dll");
     RenameClassesInBundle(bundle, renamer.RenamedClasses);
     bundle.WriteToFile("globalgamemanagers.assets");
 }
Esempio n. 2
0
        internal static void Main()
        {
            var mappingTable = JsonConvert.DeserializeObject <MappingTable>(File.ReadAllText("mappings.json"));

            AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly("Assembly-CSharp.dll.original");

            new UnusedMethodsRemover(assembly).Execute();
            var renamer = new ElementsRenamer(assembly, mappingTable);

            renamer.Execute();
            assembly.Write("Assembly-CSharp.dll");

            var bundle = UnityBundle.ReadFromFile("globalgamemanagers.assets.original");

            RenameClassesInBundle(bundle, renamer.RenamedClasses);
            bundle.WriteToFile("globalgamemanagers.assets");
        }