Bin2Object
Bin2Object copied to clipboard
Allow MapObject to copy field types that are mapped inside the ObjectMapping
For my Il2CppInspector loader I had to add a mapping for Il2CppAssemblyDefinition
and Il2CppAssemblyNameDefinition
.
public class Il2CppAssemblyDefinition
{
// ..
public Il2CppAssemblyNameDefinition aname_post16;
}
public class Il2CppAssemblyNameDefinition
{
// ..
}
stream.AddObjectMapping(typeof(Il2CppAssemblyDefinition), typeof(Types.Il2CppAssemblyDefinition));
stream.AddObjectMapping(typeof(Il2CppAssemblyNameDefinition), typeof(Types.Il2CppAssemblyNameDefinition));
Without this pull request, this would fail with the exception Object must implement IConvertible
because it can not cast between two different types on Convert.ChangeType
.