Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
avail committed Dec 1, 2018
1 parent b49f2fa commit 90857dc
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## UnityAssemblyInjector
This library is used for loading custom c# assemblies into Unity games' runtime without having to modify any game files.


## How to use
Place the dll file next to the game's main directory, if it's a 32bit unity game, use version-x86.dll, otherwise, use version-x64.dll (rename to version.dll in either case)

Create an assemblies.txt which will contain the path to your c# dlls and a static entry point path, i.e. `SomeMod\\SomeLoader.dll=SomeNamespace.SomeClass:StaticInitMethod`. you can have as many of these as you want, one per line.

The basic structure of the c# project would be as such
```csharp
namespace SomeNamespace
{
public class SomeClass
{
public static void StaticInitMethod()
{
new Thread(() =>
{
Thread.Sleep(5000); // 5 second sleep as initialization occurs *really* early
GameObject someObject = new GameObject();
someObject.AddComponent<SomeComponent>(); // MonoBehaviour
UnityEngine.Object.DontDestroyOnLoad(someObject);

}).Start();
}
}
}
```

## Downloads
Downloads can be found in the [releases](https://github.com/avail/UnityAssemblyInjector/releases) tab.

0 comments on commit 90857dc

Please sign in to comment.