-
Notifications
You must be signed in to change notification settings - Fork 1
Manual Re‐Mapper

The manual re-mapper uses branch searching to come up with results based on inputs you give it. As shown above, the interface is daunting at first. Its really quite simple. You load a mapping file (On the first run, it will load a blank mapping file for you). Then you create re-maps and add them to the list using the GUI.
The most important thing to note is everything is auto-saved for you. There is never a need to press a save button.
The manual re-mapper can take types in an original assembly, for example GClass2685 and re-map (re-name) it to a different name, for example RigClass. Its able to accomplish this in one of two ways. Using direct renaming where you take a type GClass2685 and directly assign the name RigClass to it. Alternatively and more ideally, you use pattern matching. This allows for version agnostic re-maps. You create a remap based on a specific set of patterns that only that type can match.
For example, take the following classes
public class Foo
{
private string _fooBar = "FooBar";
public void Bar()
{
Console.WriteLine(_fooBar);
}
}
public class Bar
{
private string _bar = "FooBar";
public void Bar()
{
Console.WriteLine(_bar);
}
}If you wanted to re-name the type Foo you might think that a direct rename might be the easiest and best approach, and you'd be correct in assuming its the easiest, but not the best. The best way is to create a pattern that matches the class based on a specific set of circumstances. That way your re-map is version agnostic and will remain the same throughout version changes.
In this case if you wanted to find Foo you could search for the method Foo.Bar(), but there's an issue in that. Both Foo and Bar have a method called Bar(). The next thing we can do is look at the fields of the class, Foo has a field named _fooBar while Bar does not. You can use that to match Foo, but not Bar using pattern recognition.
-
At a minimum there are only 3 required fields;
New Name,Original Name, andForce Rename. These three options combined allow you to specifically target classes for rename without generating a pattern for it. This is not recommended and only should be used when there is no other choice. -
Original name is not required if you use pattern matching, it can be left blank. Alternatively you can place the original name there anyway to store it with the mapping to know what the original type was.
-
The preferred way of doing it is by creating a search pattern as explained above. The search algorithm is non-forgiving, it will do exactly what you tell it too. tldr; you get what you ask for. If you don't need a parameter, leave it disabled. Assume everything is disabled on the page unless you interact with it.
-
For local re-maps used with the cross compiler, it is not recommended to publicize and unseal your reference project. It can cause issues at runtime due to protection levels of code being different than at compile time. Just don't do it.
-
When you are done setting your re-map parameters to what you need, click the
Add Remapbutton to add it to the list of re-maps. Additionally, you can edit an existing re-map by double clicking on it in the tree hierarchy. once you are done making changes, just pressAdd Remapto update it. -
When you are ready to re-map, select your target assembly and output paths and press
Run Remapto generated a re-mapped assembly. -
You can switch between standalone mapping mode, or project based mappings using the
Use Active Project Mappingscheckbox, explained further in the Cross Compiler section.