When things run

This set of pages is the order of the framework’s calls, from the game starting to the game closing. Each step says what is safe to call there, and what does not exist yet.

The order in five lines:

  1. BepInEx preloader patchers run first, before the game loads, and then every plugin’s Awake runs.
  2. The framework’s Start finds your mod and calls OnLoad, which is where you subscribe to events and register your own things.
  3. The main menu loads, and the framework forgets the session.
  4. A new game, a save load, a door or level change and every frame each bring their own calls.
  5. Saving writes your registered data, and quit writes only the settings you changed and the log.

Read them in this order:

Where to go next

Back to Using events for the clock, scene and save events, or to Save data for per-save data.


Table of contents