Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
OsOmE1 authored Jan 6, 2021
1 parent b753cda commit a582f33
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ A C# Library to help make deobfuscation plugins for [Il2CppInspector](https://gi
A translator class must always have the translator attribute and implement the ITranslator interface.
More information on how to structure your plugin can be found here https://github.com/OsOmE1/Il2CppTranslator/wiki/Structuring-your-plugin
```CS
[Translator("YourClass")]
class YourClass : ITranslator
{
public TypeTranslator Translator => Locate();
public string Name = "YourClass"
public List<System.Type> Dependencies = new List<System.Type>();

public TypeTranslator Locate()
TypeTranslator _type;

public void Initialize()
{
return new TypeTranslator(Helpers.GetField("YouField").DeclaringType);
_type = new TypeTranslator(Helpers.GetField("YourField").DeclaringType);
}

public void Translate()
public void TranslateFields()
{
Translator.AddField(field_offset: 0x0, static_field: false, field_name: "YourField");
_type.AddField(new FieldTranslator() {{ Offset = 0x0, Static = true, Name = "CleanName", TranslateName = true);
Translator.TranslateFields();
}

void TranslateMethods() { }

void TranslateDerivedTypes() { }
}
```

Expand Down

0 comments on commit a582f33

Please sign in to comment.