A fork of Eusth's IPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Injector.cs 658B

8 years ago
1234567891011121314151617181920212223242526
  1. using System;
  2. using UnityEngine;
  3. namespace IllusionInjector
  4. {
  5. public static class Injector
  6. {
  7. private static bool injected = false;
  8. public static void Inject()
  9. {
  10. if (!injected)
  11. {
  12. injected = true;
  13. var bootstrapper = new GameObject("Bootstrapper").AddComponent<Bootstrapper>();
  14. bootstrapper.Destroyed += Bootstrapper_Destroyed;
  15. }
  16. }
  17. private static void Bootstrapper_Destroyed()
  18. {
  19. var singleton = new GameObject("PluginManager");
  20. singleton.AddComponent<PluginComponent>(); ;
  21. }
  22. }
  23. }