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.

27 lines
674B

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