mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-08-05 09:40:18 +08:00
fix(UXAssist): start late-discovered mod features
This commit is contained in:
@@ -250,10 +250,9 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
||||
object[] parameters = [_harmony];
|
||||
_compats?.Do(type => type.GetMethod("Init")?.Invoke(null, parameters));
|
||||
|
||||
// Register UXAssist's own features (Init runs eagerly here, preserving the original Awake timing
|
||||
// that keybind registration relies on). Dependent mods register theirs during their own Awake
|
||||
// phase. Start is deferred to UXAssist.Start below so that all dependents have registered before
|
||||
// any feature starts.
|
||||
// Register UXAssist's own features. Init runs eagerly here, preserving the original Awake timing
|
||||
// that keybind registration relies on. The registry immediately starts any dependent feature that
|
||||
// is discovered after UXAssist begins the deferred lifecycle below.
|
||||
ModFeatureRegistry.Discover(Assembly.GetExecutingAssembly());
|
||||
|
||||
I18N.Apply();
|
||||
@@ -264,8 +263,8 @@ public class UXAssist : BaseUnityPlugin, IModCanSave
|
||||
MyWindowManager.InitBaseObjects();
|
||||
MyWindowManager.Enable(true);
|
||||
|
||||
// UXAssist is the sole lifecycle driver. All dependents have already registered (and initialized)
|
||||
// their features during their Awake phase (BepInEx runs every plugin's Awake before any plugin's Start).
|
||||
// UXAssist is the sole lifecycle driver. The registry also starts features discovered later so a
|
||||
// dependent cannot miss this one-time transition.
|
||||
ModFeatureRegistry.StartAll();
|
||||
|
||||
_patches?.Do(type => type.GetMethod("Start")?.Invoke(null, null));
|
||||
|
||||
Reference in New Issue
Block a user