using System; namespace UXAssist.Common.ModFeatures; /// /// Marks a class as a mod feature so that can discover it. /// Lifecycle methods (Init, Start, Uninit, OnInputUpdate, OnUpdate) /// are optional and are skipped if missing. /// /// /// /// Timing contract (same as ): Init runs eagerly at /// discovery time, synchronously inside , during the /// registering mod's BepInEx Awake phase — before the game scene loads, before any plugin's /// Start. This is the phase where early setup that must precede game initialization (e.g. /// keybind registration) must run. Start runs once during the host mod's (UXAssist) Start, /// after all mods' Awake have completed. The per-frame methods are called by UXAssist with at /// most one invocation per frame. /// /// [AttributeUsage(AttributeTargets.Class, Inherited = false)] public sealed class ModFeatureAttribute : Attribute { /// /// Optional display name of the feature. /// public string Name { get; } /// /// Execution order among discovered static features. Lower values run first. /// public int Order { get; set; } /// /// Initializes a new instance of the class. /// /// Optional display name of the feature. public ModFeatureAttribute(string name = null) { Name = name; } }