public static HookRegistry Get() { if (_instance == null) { _instance = new HookRegistry(); // Initialise the assembly store. _instance.Init(); // Setup all hook information. _instance.LoadRuntimeHooks(); // Pre-load necessary library files. ReferenceLoader.Load(); try { // Test if this code is running within the Unity Engine _instance.TestInGame(); } catch (SecurityException) { // Do nothing } } return(_instance); }
private void LoadExternalReferenceLibs() { ReferenceLoader.Load(); var ss = new StringBuilder(); ss.AppendLine("Loaded reference libraries:"); foreach (Type refType in ReferenceLoader.ReferenceTypes) { ss.AppendLine(refType.Assembly.GetName().ToString()); } Internal_Log(ss.ToString()); }