internal void Awake() { Instance = this; // setup keybinding CustomKeybindings.AddAction(TOGGLE_KEY, KeybindingsCategory.Menus, ControlType.Both); // setup harmony new Harmony(GUID).PatchAll(); // setup config Settings.Init(Config); // global scene change event SceneManager.activeSceneChanged += SceneManager_activeSceneChanged; // Load bundle var bundle = AssetBundle.LoadFromFile(ASSETBUNDLE_PATH); AlwaysOnTopMaterial = bundle.LoadAsset <Material>("UI_AlwaysOnTop"); GameObject.DontDestroyOnLoad(AlwaysOnTopMaterial); AlwaysOnTopMaterial.hideFlags |= HideFlags.HideAndDontSave; }
public void Initialise() { Patch(); CustomKeybindings.AddAction(AggroToggleKey, KeybindingsCategory.Actions, ControlType.Both, 5); }